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