debug:设备分成
This commit is contained in:
parent
6852d7afeb
commit
d668228d25
|
@ -1,6 +1,5 @@
|
||||||
package com.ruoyi.common.pay.wx.service;
|
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.exception.ServiceException;
|
||||||
import com.ruoyi.common.pay.wx.config.WxTransferConfig;
|
import com.ruoyi.common.pay.wx.config.WxTransferConfig;
|
||||||
import com.ruoyi.common.pay.wx.domain.BatchTransferAble;
|
import com.ruoyi.common.pay.wx.domain.BatchTransferAble;
|
||||||
|
|
|
@ -131,8 +131,9 @@ public class BonusConverterImpl implements BonusConverter {
|
||||||
point = point.subtract(agent.getAgentServiceRate());
|
point = point.subtract(agent.getAgentServiceRate());
|
||||||
|
|
||||||
// 代理商收取服务费
|
// 代理商收取服务费
|
||||||
result.add(this.toPo(agent, device.getAgentServiceRate().subtract(agent.getAgentServiceRate()), agent.getUserId().toString()));
|
BigDecimal agentArrivalPoint = device.getAgentServiceRate().subtract(agent.getAgentServiceRate());
|
||||||
point = point.subtract(device.getAgentServiceRate());
|
result.add(this.toPo(agent, agentArrivalPoint, agent.getUserId().toString(), BonusArrivalType.AGENT));
|
||||||
|
point = point.subtract(agentArrivalPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
ServiceUtil.assertion(point.compareTo(BigDecimal.ZERO) < 0, "商户剩余分成不允许小于0");
|
ServiceUtil.assertion(point.compareTo(BigDecimal.ZERO) < 0, "商户剩余分成不允许小于0");
|
||||||
|
@ -143,7 +144,7 @@ public class BonusConverterImpl implements BonusConverter {
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.map(Object::toString)
|
.map(Object::toString)
|
||||||
.collect(Collectors.joining(","));
|
.collect(Collectors.joining(","));
|
||||||
result.add(this.toPo(mch, point, ancestors));
|
result.add(this.toPo(mch, point, ancestors, BonusArrivalType.MCH));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -223,7 +224,7 @@ public class BonusConverterImpl implements BonusConverter {
|
||||||
return po;
|
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) {
|
if (user == null || point == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -232,10 +233,7 @@ public class BonusConverterImpl implements BonusConverter {
|
||||||
po.setStatus(BonusStatus.UN_DIVIDEND.getStatus());
|
po.setStatus(BonusStatus.UN_DIVIDEND.getStatus());
|
||||||
po.setArrivalId(user.getUserId());
|
po.setArrivalId(user.getUserId());
|
||||||
po.setArrivalName(user.getRealOrUserName());
|
po.setArrivalName(user.getRealOrUserName());
|
||||||
BonusArrivalType arrivalType = BonusArrivalType.parseByUserType(user.getType());
|
po.setArrivalType(arrivalType.getType());
|
||||||
if (arrivalType != null) {
|
|
||||||
po.setArrivalType(arrivalType.getType());
|
|
||||||
}
|
|
||||||
po.setPoint(point);
|
po.setPoint(point);
|
||||||
po.setAncestors(ancestors);
|
po.setAncestors(ancestors);
|
||||||
po.setDeptId(Constants.ROOT_DEPT);
|
po.setDeptId(Constants.ROOT_DEPT);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user