From 6bb0b12264bef9d603f283955c3be44a76878b1a Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 7 Aug 2024 16:26:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hfkj/service/order/OrderCreateService.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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) {