|
|
|
@ -108,12 +108,14 @@ public class OrderCreateService { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法交易,代理商二维码已失效"); |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
// 扣除代理商商户金额
|
|
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
|
param.put("sourceType", MerchantAccountRecordSourceTypeEnum.type2.getType()); |
|
|
|
|
param.put("sourceOrderNo", gasOrder.getOrderNo()); |
|
|
|
|
param.put("sourceOrderContent", "创建加油订单:"+gasOrder.getOrderNo()+",加油金额:¥" +orderChild.getProductPrice()); |
|
|
|
|
agentMerAccountService.consume(agentMer.getAgentId(), agentMer.getMerNo(), orderChild.getProductPrice(), param); |
|
|
|
|
if (MerchantSourceTypeEnum.type1.getNumber().equals(merchant.getSourceType())) { |
|
|
|
|
// 扣除代理商商户金额
|
|
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
|
param.put("sourceType", MerchantAccountRecordSourceTypeEnum.type2.getType()); |
|
|
|
|
param.put("sourceOrderNo", gasOrder.getOrderNo()); |
|
|
|
|
param.put("sourceOrderContent", "创建加油订单:"+gasOrder.getOrderNo()+",加油金额:¥" +orderChild.getProductPrice()); |
|
|
|
|
agentMerAccountService.consume(agentMer.getAgentId(), agentMer.getMerNo(), orderChild.getProductPrice(), param); |
|
|
|
|
} |
|
|
|
|
} catch (BaseException e) { |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getErrorMsg()); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|