|
|
@ -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()); |
|
|
|