提交代码

dev-discount
胡锐 3 years ago
parent bb3a57d33e
commit 232320b0bd
  1. 18
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  2. 13
      hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java

@ -85,6 +85,12 @@ public class HighOrderServiceImpl implements HighOrderService {
@Resource @Resource
private HighOrderService highOrderService; private HighOrderService highOrderService;
@Resource
private HighActivityInfoService highActivityInfoService;
@Resource
private HighActivityUserLotteryNumService highActivityUserLotteryNumService;
@Override @Override
@Transactional(propagation= Propagation.REQUIRES_NEW) @Transactional(propagation= Propagation.REQUIRES_NEW)
public void insertOrder(HighOrder highOrder) throws Exception { public void insertOrder(HighOrder highOrder) throws Exception {
@ -275,6 +281,12 @@ public class HighOrderServiceImpl implements HighOrderService {
highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用 highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用
highUserCouponMapper.insert(highUserCoupon); highUserCouponMapper.insert(highUserCoupon);
} }
// 查询卡券是否有活动
Map<String, Object> activity = highActivityInfoService.getNewActivityByCouponId(coupon.getId());
if (activity != null && MapUtils.getLong(activity, "id") != null) {
highActivityUserLotteryNumService.addLotteryNum(MapUtils.getLong(activity, "id"),highOrder.getMemId(), 1);
}
} }
} }
@ -429,6 +441,12 @@ public class HighOrderServiceImpl implements HighOrderService {
highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用 highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用
highUserCouponMapper.insert(highUserCoupon); highUserCouponMapper.insert(highUserCoupon);
} }
// 查询卡券是否有活动
Map<String, Object> activity = highActivityInfoService.getNewActivityByCouponId(coupon.getId());
if (activity != null && MapUtils.getLong(activity, "id") != null) {
highActivityUserLotteryNumService.addLotteryNum(MapUtils.getLong(activity, "id"),order.getMemId(), 1);
}
} }
if (highChildOrder.getGoodsType() == 2) { if (highChildOrder.getGoodsType() == 2) {

@ -22,6 +22,7 @@ import com.hai.model.ResultProfitSharing;
import com.hai.service.*; import com.hai.service.*;
import com.hai.service.pay.NotifyService; import com.hai.service.pay.NotifyService;
import com.hai.service.pay.PayService; import com.hai.service.pay.PayService;
import org.apache.commons.collections4.MapUtils;
import org.apache.http.HttpEntity; import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpPost;
@ -81,6 +82,12 @@ public class GoodsOrderServiceImpl implements PayService {
@Resource @Resource
private HighCouponCodeOtherMapper highCouponCodeOtherMapper; private HighCouponCodeOtherMapper highCouponCodeOtherMapper;
@Resource
private HighActivityInfoService highActivityInfoService;
@Resource
private HighActivityUserLotteryNumService highActivityUserLotteryNumService;
@Resource @Resource
private NotifyService notifyService; private NotifyService notifyService;
@ -199,6 +206,12 @@ public class GoodsOrderServiceImpl implements PayService {
highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用 highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用
highUserCouponMapper.insert(highUserCoupon); highUserCouponMapper.insert(highUserCoupon);
} }
// 查询卡券是否有活动
Map<String, Object> activity = highActivityInfoService.getNewActivityByCouponId(coupon.getId());
if (activity != null && MapUtils.getLong(activity, "id") != null) {
highActivityUserLotteryNumService.addLotteryNum(MapUtils.getLong(activity, "id"),order.getMemId(), 1);
}
} }
if (highChildOrder.getGoodsType() == 2) { if (highChildOrder.getGoodsType() == 2) {

Loading…
Cancel
Save