|
|
@ -161,13 +161,14 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService { |
|
|
|
List<HighUserCoupon> list = highUserCouponService.getUserCouponList(map); |
|
|
|
List<HighUserCoupon> list = highUserCouponService.getUserCouponList(map); |
|
|
|
if (list.size() > 0) { |
|
|
|
if (list.size() > 0) { |
|
|
|
for (HighUserCoupon userCoupon : list) { |
|
|
|
for (HighUserCoupon userCoupon : list) { |
|
|
|
|
|
|
|
userCoupon.setConsumeTime(useTime); |
|
|
|
|
|
|
|
userCoupon.setStatus(2); // 状态 0:已过期 1:未使用 2:已使用
|
|
|
|
|
|
|
|
highUserCouponService.updateUserCoupon(userCoupon); |
|
|
|
|
|
|
|
|
|
|
|
HighChildOrderExample example = new HighChildOrderExample(); |
|
|
|
HighChildOrderExample example = new HighChildOrderExample(); |
|
|
|
example.createCriteria().andMemIdEqualTo(userCoupon.getUserId()).andGoodsTypeEqualTo(1).andGoodsIdEqualTo(userCoupon.getCouponId()).andChildOrdeStatusEqualTo(2); |
|
|
|
example.createCriteria().andMemIdEqualTo(userCoupon.getUserId()).andGoodsTypeEqualTo(1).andGoodsIdEqualTo(userCoupon.getCouponId()).andChildOrdeStatusEqualTo(2); |
|
|
|
List<HighChildOrder> childOrderList = highChildOrderMapper.selectByExample(example); |
|
|
|
List<HighChildOrder> childOrderList = highChildOrderMapper.selectByExample(example); |
|
|
|
if (childOrderList.size() > 0) { |
|
|
|
if (childOrderList.size() > 0) { |
|
|
|
userCoupon.setConsumeTime(useTime); |
|
|
|
|
|
|
|
userCoupon.setStatus(2); // 状态 0:已过期 1:未使用 2:已使用
|
|
|
|
|
|
|
|
highUserCouponService.updateUserCoupon(userCoupon); |
|
|
|
|
|
|
|
highOrderService.childOrderComplete(childOrderList.get(0).getId()); |
|
|
|
highOrderService.childOrderComplete(childOrderList.get(0).getId()); |
|
|
|
} |
|
|
|
} |
|
|
|
/*HighChildOrder order = highOrderService.getChildOrderByUserGoods(userCoupon.getUserId(), 1, userCoupon.getCouponId()); |
|
|
|
/*HighChildOrder order = highOrderService.getChildOrderByUserGoods(userCoupon.getUserId(), 1, userCoupon.getCouponId()); |
|
|
|