Browse Source

收费管理,金额分润,可以填0不限定金额

周箭河 4 years ago
parent
commit
173658af93

+ 2 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/PayServiceImpl.java

@@ -172,7 +172,8 @@ public class PayServiceImpl implements PayService {
         List<AmountChannelDto> amountChannelDtoList = JSON.parseArray(amountChannel, AmountChannelDto.class);
         for (AmountChannelDto amountChannelDto : amountChannelDtoList) {
             if (amountChannelDto.getOrganId().equals(organId) &&
-                    amount.compareTo(amountChannelDto.getAmount()) == 0 &&
+                    //0的时候不限定金额
+                    (amountChannelDto.getAmount().compareTo(BigDecimal.ZERO) == 0 || amount.compareTo(amountChannelDto.getAmount()) == 0) &&
                     receiver.equals(amountChannelDto.getType())
             ) {
                 routeOrganId = amountChannelDto.getRouteOrganId();