From d668228d2586b0cccc40245ee5f3dd44671acd44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Wed, 9 Oct 2024 14:32:57 +0800 Subject: [PATCH] =?UTF-8?q?debug:=E8=AE=BE=E5=A4=87=E5=88=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/pay/wx/service/WxTransferService.java | 1 - .../ss/bonus/service/impl/BonusConverterImpl.java | 14 ++++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/pay/wx/service/WxTransferService.java b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/pay/wx/service/WxTransferService.java index 0838dbda..45b844d9 100644 --- a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/pay/wx/service/WxTransferService.java +++ b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/pay/wx/service/WxTransferService.java @@ -1,6 +1,5 @@ package com.ruoyi.common.pay.wx.service; -import com.ruoyi.common.pay.wx.config.WxPayConfig; import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.pay.wx.config.WxTransferConfig; import com.ruoyi.common.pay.wx.domain.BatchTransferAble; diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/impl/BonusConverterImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/impl/BonusConverterImpl.java index 490ce0b5..4e686b6a 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/impl/BonusConverterImpl.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/bonus/service/impl/BonusConverterImpl.java @@ -131,8 +131,9 @@ public class BonusConverterImpl implements BonusConverter { point = point.subtract(agent.getAgentServiceRate()); // 代理商收取服务费 - result.add(this.toPo(agent, device.getAgentServiceRate().subtract(agent.getAgentServiceRate()), agent.getUserId().toString())); - point = point.subtract(device.getAgentServiceRate()); + BigDecimal agentArrivalPoint = device.getAgentServiceRate().subtract(agent.getAgentServiceRate()); + result.add(this.toPo(agent, agentArrivalPoint, agent.getUserId().toString(), BonusArrivalType.AGENT)); + point = point.subtract(agentArrivalPoint); } ServiceUtil.assertion(point.compareTo(BigDecimal.ZERO) < 0, "商户剩余分成不允许小于0"); @@ -143,7 +144,7 @@ public class BonusConverterImpl implements BonusConverter { .filter(Objects::nonNull) .map(Object::toString) .collect(Collectors.joining(",")); - result.add(this.toPo(mch, point, ancestors)); + result.add(this.toPo(mch, point, ancestors, BonusArrivalType.MCH)); return result; } @@ -223,7 +224,7 @@ public class BonusConverterImpl implements BonusConverter { return po; } - private Bonus toPo(SmUserVo user, BigDecimal point, String ancestors) { + private Bonus toPo(SmUserVo user, BigDecimal point, String ancestors, BonusArrivalType arrivalType) { if (user == null || point == null) { return null; } @@ -232,10 +233,7 @@ public class BonusConverterImpl implements BonusConverter { po.setStatus(BonusStatus.UN_DIVIDEND.getStatus()); po.setArrivalId(user.getUserId()); po.setArrivalName(user.getRealOrUserName()); - BonusArrivalType arrivalType = BonusArrivalType.parseByUserType(user.getType()); - if (arrivalType != null) { - po.setArrivalType(arrivalType.getType()); - } + po.setArrivalType(arrivalType.getType()); po.setPoint(point); po.setAncestors(ancestors); po.setDeptId(Constants.ROOT_DEPT);