Browse Source

[精准发券][修改][减库存]

release_toaliyun_real
gongbiao 7 years ago
parent
commit
ab642418bd
2 changed files with 9 additions and 3 deletions
  1. +6
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  2. +3
    -3
      mallinkService/src/main/resources/mapper/WxCouponInjectMapper.xml

+ 6
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java View File

@@ -613,6 +613,9 @@ public class WxOrderServiceImpl implements WxOrderService {
throw new MallinkException(ErrorCode.COUPON_IS_NOT_FREE);
}

// 减库存操作
stockReduce(user, coupon, couponIdStr);

int payment = coupon.getSalePrice();

Date curr = new Date();
@@ -692,6 +695,9 @@ public class WxOrderServiceImpl implements WxOrderService {
throw new MallinkException(ErrorCode.COUPON_IS_NOT_FREE);
}

// 减库存操作
stockReduce(user, coupon, couponIdStr);

int payment = coupon.getSalePrice();

Date curr = new Date();


+ 3
- 3
mallinkService/src/main/resources/mapper/WxCouponInjectMapper.xml View File

@@ -55,9 +55,9 @@
<if test=" null != couponId ">
and `coupon_id` = #{couponId}
</if>
<if test=" null != couponName ">
</if>
<if test=" null != couponName and couponName!=''">
and `coupon_name` like concat('%', #{couponName},'%')
</if>


Loading…
Cancel
Save