|
@@ -472,6 +472,7 @@ public class PayServiceImpl implements PayService {
|
|
|
List<Map<String, Object>> tempRoutingList = new ArrayList<>();
|
|
|
|
|
|
PaymentChannelEnum patType = null;
|
|
|
+ boolean feeFlag = false;
|
|
|
for (RouteScaleDto routeScaleDto : routeScaleDtos) {
|
|
|
patType = routeScaleDto.getPayType();
|
|
|
Map<String, Object> routingList = new HashMap<>();
|
|
@@ -489,15 +490,23 @@ public class PayServiceImpl implements PayService {
|
|
|
routeBalanceAmount = balanceAmount.subtract(hasRouteBalanceAmount).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
routingMoney = amount.subtract(hasRouteMoney).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
}
|
|
|
+
|
|
|
+ if (routingFee.compareTo(BigDecimal.ZERO) <= 0) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
hasRouteAmount = hasRouteAmount.add(routingFee);
|
|
|
hasRouteBalanceAmount = hasRouteBalanceAmount.add(routeBalanceAmount);
|
|
|
hasRouteMoney = hasRouteMoney.add(routingMoney);
|
|
|
|
|
|
routingList.put("routingMerNo", routeScaleDto.getMerNo());//分佣账户
|
|
|
routingList.put("routingFee", routingFee); //分佣金额
|
|
|
-
|
|
|
- if (routingFee.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
- tempRoutingList.add(routingList);
|
|
|
+ tempRoutingList.add(routingList);
|
|
|
+ if (routeScaleDto.getFeeFlag().equals("Y")) {
|
|
|
+ feeFlag = true;
|
|
|
+ }
|
|
|
+ if (i == routeScaleDtos.size() && !feeFlag) {
|
|
|
+ routeScaleDto.setFeeFlag("Y");
|
|
|
}
|
|
|
|
|
|
StudentPaymentRouteOrder studentPaymentRouteOrder = new StudentPaymentRouteOrder();
|