From 04dfa0c9a5c31be05e4010a67dcb4401bcb7c7cf Mon Sep 17 00:00:00 2001 From: "Stormeye.Wu" Date: Thu, 30 Aug 2018 12:44:35 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=81=9C=E8=BD=A6=E5=88=B8][=E6=96=B0?= =?UTF-8?q?=E5=A2=9E]=EF=BC=9A=E5=BA=93=E5=AD=98=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/simple/controller/WxCarController.java | 12 ------------ .../src/main/resources/mapper/WxCouponCarMapper.xml | 4 ++-- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/simple/controller/WxCarController.java b/mallinkAdmin/src/main/java/com/simple/controller/WxCarController.java index 3ea2906cb..1ebb48866 100644 --- a/mallinkAdmin/src/main/java/com/simple/controller/WxCarController.java +++ b/mallinkAdmin/src/main/java/com/simple/controller/WxCarController.java @@ -199,13 +199,7 @@ public class WxCarController extends BaseController Integer amount = vendorParamsObj.getInteger("amount"); Integer avaliavleNum = vendorParamsObj.getInteger("avaliavleNum"); Integer amtCount = wxCouponCarService.getAmtCountByTemplateId(templateId); - if (amtCount == null) { - amtCount = 0; - } Integer availCount = wxCouponCarService.getAvaibleCountByTemplateId(templateId); - if (availCount == null) { - availCount = 0; - } if (amtCount >= amount) { logger.error("已达到停车厂商优免券数量限制"); return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "已达到停车厂商优免券数量限制"); @@ -282,9 +276,6 @@ public class WxCarController extends BaseController Integer amountCount = 0; try { amountCount = wxCouponCarService.getAmtCountByTemplateId(templateId); - if (amountCount == null) { - amountCount = 0; - } } catch (Exception e) { logger.error(e.getMessage()); } @@ -301,9 +292,6 @@ public class WxCarController extends BaseController Integer availCount = 0; try { availCount = wxCouponCarService.getAvaibleCountByTemplateId(templateId); - if (availCount == null) { - availCount = 0; - } } catch (Exception e) { logger.error(e.getMessage()); } diff --git a/mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml index 2dd872c47..f5e196b62 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponCarMapper.xml @@ -73,7 +73,7 @@