提交代码

dev-discount
胡锐 2 years ago
parent aaa051848c
commit 54ef27e2e9
  1. 2
      hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java
  2. 2
      hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java

@ -103,7 +103,7 @@ public class HighUserDiscountController {
JSONObject jsonObject = JSONObject.parseObject(reqBody);
String discountAgentCode = jsonObject.getString("code");
if (StringUtils.isNotBlank(discountAgentCode)) {
if (StringUtils.isBlank(discountAgentCode)) {
log.error("HighDiscountController -> receiveDiscount() error!", "参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}

@ -137,7 +137,7 @@ public class HighDiscountUserRelServiceImpl implements HighDiscountUserRelServic
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券已达到上线");
}
// 查询可分配的优惠券code
List<HighDiscountAgentCode> discountAgentCodeList = highDiscountAgentCodeService.getDiscountCodeByDiscountAgentId(discountAgentRel.getId());
List<HighDiscountAgentCode> discountAgentCodeList = highDiscountAgentCodeService.getDiscountCodeByStatus(discountAgentRel.getId(), 1);
if (discountAgentCodeList.size() == 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券已无库存");
}

Loading…
Cancel
Save