From ba232e8e984a3377ff4c760edd0807f61b52ccc5 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Mon, 13 May 2019 16:14:49 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BA=93=E5=AD=98][=E4=BF=AE=E6=94=B9]:?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/controller/market/WxCouponController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java index bb0415e19..80c390333 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponController.java @@ -75,6 +75,9 @@ public class WxCouponController extends BaseController { if(wxCoupon.getRemainInventory() == null || wxCoupon.getInventory() == null) { return new ResultData(ErrorCode.COUPON_STOCK_ERR); } + if(wxCoupon.getRemainInventory() > wxCoupon.getInventory()) { + return new ResultData(ErrorCode.COUPON_STOCK_ERR); + } if(wxCoupon.getValidType() == null) { return new ResultData(ErrorCode.COUPON_VALID_DATE_ERR); }