From ab642418bdc953fce0a3a3aaa2ae72f904c9f610 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Mon, 7 Jan 2019 10:49:16 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=B2=BE=E5=87=86=E5=8F=91=E5=88=B8][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E5=87=8F=E5=BA=93=E5=AD=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iformall/service/impl/WxOrderServiceImpl.java | 6 ++++++ .../src/main/resources/mapper/WxCouponInjectMapper.xml | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index e7eb3411b..7dd8e58a5 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -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(); diff --git a/mallinkService/src/main/resources/mapper/WxCouponInjectMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponInjectMapper.xml index d0a898984..6309176f5 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponInjectMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponInjectMapper.xml @@ -55,9 +55,9 @@ and `coupon_id` = #{couponId} - - - + + + and `coupon_name` like concat('%', #{couponName},'%')