|
|
|
@ -174,7 +174,7 @@ public class HighCouponController { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 查询商户
|
|
|
|
|
HighMerchant merchant = highMerchantService.getMerchantById(highCoupon.getCompanyId()); |
|
|
|
|
HighMerchant merchant = highMerchantService.getMerchantById(highCoupon.getMerchantId()); |
|
|
|
|
if (merchant == null) { |
|
|
|
|
log.error("HighCouponController -> updateCoupon() error!","未找到商户"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, ""); |
|
|
|
@ -208,13 +208,13 @@ public class HighCouponController { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_COUPON, ""); |
|
|
|
|
} |
|
|
|
|
// 如果卡卷状态不处于 编辑中、已下架、审上架批驳回
|
|
|
|
|
if (coupon.getStatus() != 1 || coupon.getStatus() != 3 || coupon.getStatus() != 102) { |
|
|
|
|
if (coupon.getStatus() != 1 && coupon.getStatus() != 3 && coupon.getStatus() != 102) { |
|
|
|
|
log.error("HighCouponController -> upShelfApprove() error!","卡卷状态错误"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COUPON_UNABLE_UP_SHELF, ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 根据卡卷查询 销售码库存
|
|
|
|
|
if (highCouponCodeService.getStockCountByCoupon(coupon.getId()) <= 0) { |
|
|
|
|
if (highCouponCodeService.getStockCountByCoupon(coupon.getId()) == 0) { |
|
|
|
|
log.error("HighCouponController -> upShelfApprove() error!","卡卷库存数量错误"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COUPON_STOCK_ERROR, ""); |
|
|
|
|
} |
|
|
|
|