| | |
| | | String activityName = ""; |
| | | OrderInfo orderInfo = ordersTotal.getOrderInfo(); |
| | | logger.info("接收的orderInfo:"+JSON.toJSONString(orderInfo)); |
| | | orderInfo.setOrderId(ordersTotal.getId()); |
| | | //如果有用活动规则将活动规则保存在orderInfo |
| | | if (ordersTotal.getActivityIds() != null && ordersTotal.getActivityIds().size() > 0) { |
| | | //查询活动规则基础信息 |
| | | ActivityRule activityRule = commonService.selectOneByKey(ActivityRuleMapper.class, ordersTotal.getActivityIds().get(0)); |
| | | if (activityRule != null) { |
| | | orderInfo.setActivityId(activityRule.getId()); |
| | | orderInfo.setActivityName(activityRule.getName()); |
| | | activityName = activityRule.getName(); |
| | | } |
| | | } |
| | | BigDecimal defaultDiscount = new BigDecimal(100); |
| | | if (ordersTotal.getOrderInfo() == null) { |
| | | orderInfo = new OrderInfo(); |
| | | orderInfo.setIsWholeDiscount(0); |
| | | orderInfo.setIsEmployeeDiscount(0); |
| | | orderInfo.setDiscount(defaultDiscount); |
| | |
| | | orderInfo.setDiscount(ordersTotal.getOrderInfo().getDiscount()==null?new BigDecimal(100):ordersTotal.getOrderInfo().getDiscount()); |
| | | } |
| | | } |
| | | orderInfo.setOrderId(ordersTotal.getId()); |
| | | //如果有用活动规则将活动规则保存在orderInfo |
| | | if (ordersTotal.getActivityIds() != null && ordersTotal.getActivityIds().size() > 0) { |
| | | //查询活动规则基础信息 |
| | | ActivityRule activityRule = commonService.selectOneByKey(ActivityRuleMapper.class, ordersTotal.getActivityIds().get(0)); |
| | | if (activityRule != null) { |
| | | orderInfo.setActivityId(activityRule.getId()); |
| | | orderInfo.setActivityName(activityRule.getName()); |
| | | activityName = activityRule.getName(); |
| | | } |
| | | } |
| | | //用户推荐人处理 |
| | | if (StringUtils.noNull(user.getInviteeId())) { |
| | | orderInfo.setInviteeId(user.getInviteeId()); |