diff --git a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java index 38d7cb6..4455934 100644 --- a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java +++ b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java @@ -108,12 +108,14 @@ public class OrderCreateService { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法交易,代理商二维码已失效"); } try { - // 扣除代理商商户金额 - Map 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 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) {