|
|
|
@@ -199,7 +199,13 @@ 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(), "已达到停车厂商优免券数量限制"); |
|
|
|
@@ -276,6 +282,9 @@ 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()); |
|
|
|
} |
|
|
|
@@ -292,6 +301,9 @@ 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()); |
|
|
|
} |
|
|
|
|