代码接口,异常规范问题处理。
This commit is contained in:
@@ -18,7 +18,6 @@ import cn.lili.modules.system.entity.enums.SettingEnum;
|
||||
import cn.lili.modules.system.service.SettingService;
|
||||
import com.google.gson.Gson;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 会员经验值
|
||||
@@ -26,7 +25,7 @@ import org.springframework.stereotype.Service;
|
||||
* @author Bulbasaur
|
||||
* @since: 2021/5/16 11:16 下午
|
||||
*/
|
||||
@Service
|
||||
//@Service
|
||||
public class MemberExperienceExecute implements MemberRegisterEvent, GoodsCommentCompleteEvent, OrderStatusChangeEvent {
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,6 +2,7 @@ package cn.lili.event.impl;
|
||||
|
||||
|
||||
import cn.lili.common.utils.CurrencyUtil;
|
||||
import cn.lili.common.utils.StringUtils;
|
||||
import cn.lili.event.AfterSaleStatusChangeEvent;
|
||||
import cn.lili.event.GoodsCommentCompleteEvent;
|
||||
import cn.lili.event.MemberRegisterEvent;
|
||||
@@ -84,9 +85,9 @@ public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentComp
|
||||
public void orderChange(OrderMessage orderMessage) {
|
||||
|
||||
if (orderMessage.getNewStatus().equals(OrderStatusEnum.COMPLETED)) {
|
||||
//根据订单编号获取订单数据,如果为积分订单则跳回
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
if (order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINT.name())) {
|
||||
//根据订单编号获取订单数据,如果订单促销类型不为空,并且订单促销类型为积分订单 则直接返回
|
||||
if (StringUtils.isNotEmpty(order.getOrderPromotionType()) && order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINT.name())) {
|
||||
return;
|
||||
}
|
||||
//获取积分设置
|
||||
|
||||
@@ -95,8 +95,12 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
|
||||
//添加站内信参数
|
||||
params.put(NoticeMessageParameterEnum.GOODS.getType(), orderDetailVO.getOrderItems().get(0).getGoodsName());
|
||||
noticeMessageDTO.setParameter(params);
|
||||
//保存站内信
|
||||
noticeMessageService.noticeMessage(noticeMessageDTO);
|
||||
|
||||
//如果有消息,则发送消息
|
||||
if (noticeMessageDTO.getNoticeMessageNodeEnum() != null) {
|
||||
//保存站内信
|
||||
noticeMessageService.noticeMessage(noticeMessageDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user