| @@ -46,26 +46,26 @@ public class FmInsideOrderSuccessMsgServiceImpl implements MsgSendService { | |||||
| FmInsideOrderSuccessMsg msg = (FmInsideOrderSuccessMsg)baseMsg; | FmInsideOrderSuccessMsg msg = (FmInsideOrderSuccessMsg)baseMsg; | ||||
| WxOrder record = orderService.getById(msg.getOrderId()); | WxOrder record = orderService.getById(msg.getOrderId()); | ||||
| if(record == null) { | if(record == null) { | ||||
| logger.error("订单未找到" + msg.getOrderId()); | |||||
| logger.error("订单未找到: " + msg.getOrderId()); | |||||
| throw new MallinkException(ErrorCode.ORDER_IS_NOT_FIND.getCode(), "订单未找到" + msg.getOrderId()); | throw new MallinkException(ErrorCode.ORDER_IS_NOT_FIND.getCode(), "订单未找到" + msg.getOrderId()); | ||||
| } | } | ||||
| if(record.getcUserId() != msg.getCUserId()) { | |||||
| logger.error("订单用户不一致" + msg.getOrderId()); | |||||
| if(!record.getcUserId().equals(msg.getCUserId())) { | |||||
| logger.error("订单用户不一致: " + msg.getOrderId()); | |||||
| throw new MallinkException(ErrorCode.ORDER_USER_NOT_MATCH.getCode(), "订单用户不一致" + msg.getOrderId()); | throw new MallinkException(ErrorCode.ORDER_USER_NOT_MATCH.getCode(), "订单用户不一致" + msg.getOrderId()); | ||||
| } | } | ||||
| WxCouponChannel couponChannel = couponChannelService.getById(record.getCouponChannelId()); | WxCouponChannel couponChannel = couponChannelService.getById(record.getCouponChannelId()); | ||||
| if(couponChannel == null) { | if(couponChannel == null) { | ||||
| logger.error("投放渠道未找到" + record.getCouponChannelId()); | |||||
| logger.error("投放渠道未找到: " + record.getCouponChannelId()); | |||||
| throw new MallinkException(ErrorCode.ORDER_COUPON_CHANNEL_NOT_MATCH.getCode(), "投放渠道未找到" + record.getCouponChannelId()); | throw new MallinkException(ErrorCode.ORDER_COUPON_CHANNEL_NOT_MATCH.getCode(), "投放渠道未找到" + record.getCouponChannelId()); | ||||
| } | } | ||||
| if(couponChannel.getCouponId() != msg.getCouponId()) { | |||||
| logger.error("券ID不一致" + msg.getCouponId()); | |||||
| if(!couponChannel.getCouponId().equals(msg.getCouponId())) { | |||||
| logger.error("券ID不一致: " + msg.getCouponId()); | |||||
| throw new MallinkException(ErrorCode.ORDER_COUPON_NOT_MATCH.getCode(), "订单用户不一致" + msg.getOrderId()); | throw new MallinkException(ErrorCode.ORDER_COUPON_NOT_MATCH.getCode(), "订单用户不一致" + msg.getOrderId()); | ||||
| } | } | ||||
| WxCUser user = userService.getById(msg.getCUserId()); | WxCUser user = userService.getById(msg.getCUserId()); | ||||
| if(user == null) { | if(user == null) { | ||||
| logger.error("用户未找到" + msg.getCUserId()); | |||||
| logger.error("用户未找到: " + msg.getCUserId()); | |||||
| throw new MallinkException(ErrorCode.USER_IS_EMPTY.getCode(), "用户未找到" + msg.getCUserId()); | throw new MallinkException(ErrorCode.USER_IS_EMPTY.getCode(), "用户未找到" + msg.getCUserId()); | ||||
| } | } | ||||
| WxCoupon coupon = couponService.getById(msg.getCouponId()); | WxCoupon coupon = couponService.getById(msg.getCouponId()); | ||||