|
@@ -660,10 +660,7 @@ public class LifeUserOrderService extends ServiceImpl<LifeUserOrderMapper, LifeU
|
|
|
//2.判断是否使用优惠券
|
|
//2.判断是否使用优惠券
|
|
|
//查询优惠券信息
|
|
//查询优惠券信息
|
|
|
if (StringUtils.isNotEmpty(lifeUserOrderDto.getYhquanId())) {
|
|
if (StringUtils.isNotEmpty(lifeUserOrderDto.getYhquanId())) {
|
|
|
- LifeDiscountCouponUser lifeDiscountCouponUser = lifeDiscountCouponUserMapper.selectOne(new QueryWrapper<LifeDiscountCouponUser>()
|
|
|
|
|
- .eq("coupon_id", lifeUserOrderDto.getYhquanId())
|
|
|
|
|
- .eq("user_id", lifeUserOrderDto.getUserId())
|
|
|
|
|
- .eq("delete_flag", 0));
|
|
|
|
|
|
|
+ LifeDiscountCouponUser lifeDiscountCouponUser = lifeDiscountCouponUserMapper.selectById(lifeUserOrderDto.getYhquanId());
|
|
|
//将优惠券状态变更为已使用
|
|
//将优惠券状态变更为已使用
|
|
|
lifeDiscountCouponUser.setStatus(Integer.parseInt(DiscountCouponEnum.HAVE_BEEN_USED.getValue()));
|
|
lifeDiscountCouponUser.setStatus(Integer.parseInt(DiscountCouponEnum.HAVE_BEEN_USED.getValue()));
|
|
|
//将优惠券使用时间存入
|
|
//将优惠券使用时间存入
|