Merge remote-tracking branch 'origin/2.0-master' into 2.0-master

new-dev
袁野 1 year ago
commit d4cc23cce6
  1. 6
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  2. 8
      hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java

@ -217,6 +217,12 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, response.getString("msg")); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, response.getString("msg"));
} }
childOrder.setChannelOrderNo(response.getJSONObject("data").getString("rechargeOrderId")); childOrder.setChannelOrderNo(response.getJSONObject("data").getString("rechargeOrderId"));
} else if (coupon.getCouponSource().equals(5)) {
// 重庆中石油业务状态
SecConfig cqCnpcStatus = secConfigService.findByCodeType("CQ_CNPC_STATUS_" + coupon.getCouponKey());
if (cqCnpcStatus != null && StringUtils.isNotBlank(cqCnpcStatus.getCodeValue())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, cqCnpcStatus.getCodeValue());
}
} }
// 校验优惠券是否可用 如果使用优惠券就只能使用卡券的原价 // 校验优惠券是否可用 如果使用优惠券就只能使用卡券的原价

@ -78,6 +78,9 @@ public class HighDiscountAgentCodeServiceImpl implements HighDiscountAgentCodeSe
@Resource @Resource
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
@Resource
private SecConfigService secConfigService;
@Override @Override
public void insertCodeList(List<HighDiscountAgentCode> discountAgentCodeList) { public void insertCodeList(List<HighDiscountAgentCode> discountAgentCodeList) {
highDiscountAgentCodeMapper.insertListCode(discountAgentCodeList); highDiscountAgentCodeMapper.insertListCode(discountAgentCodeList);
@ -258,6 +261,11 @@ public class HighDiscountAgentCodeServiceImpl implements HighDiscountAgentCodeSe
if (couponList.size() == 0) { if (couponList.size() == 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券未配置重庆中石油卡券"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券未配置重庆中石油卡券");
} }
// 重庆中石油业务状态
SecConfig cqCnpcStatus = secConfigService.findByCodeType("CQ_CNPC_STATUS_" + couponList.get(0).getHighCoupon().getCouponKey());
if (cqCnpcStatus != null && StringUtils.isNotBlank(cqCnpcStatus.getCodeValue())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, cqCnpcStatus.getCodeValue());
}
String tradeId = discountAgentCode.getId()+""+System.currentTimeMillis()+""; String tradeId = discountAgentCode.getId()+""+System.currentTimeMillis()+"";
// 预发码 // 预发码
JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(couponList.get(0).getHighCoupon().getCouponKey(), tradeId, 1, userModel.getHighUser().getPhone()); JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(couponList.get(0).getHighCoupon().getCouponKey(), tradeId, 1, userModel.getHighUser().getPhone());

Loading…
Cancel
Save