|
@@ -263,7 +263,7 @@ public class PayServiceImpl implements PayService {
|
|
|
SysPaymentConfig paymentConfig = sysPaymentConfigService.findPaymentConfigByOrganId(organId);
|
|
|
if (paymentConfig == null || StringUtils.isBlank(paymentConfig.getRouteScale())) {
|
|
|
String paymentChannel = sysConfigDao.findConfigValue("payment_channel");
|
|
|
- if(paymentConfig != null){
|
|
|
+ if (paymentConfig != null) {
|
|
|
paymentChannel = paymentConfig.getPayType().getCode();
|
|
|
}
|
|
|
List<RouteScaleDto> routeScaleDtos = new ArrayList<>();
|
|
@@ -311,11 +311,15 @@ public class PayServiceImpl implements PayService {
|
|
|
while (iterator.hasNext()) {
|
|
|
RouteScaleDto routeScaleDto = iterator.next();
|
|
|
Integer num = routeScaleDto.getScale();
|
|
|
+ boolean flag = false;
|
|
|
if (rem > scale && rem <= scale + num) {
|
|
|
routeScaleDto.setScale(100);
|
|
|
- continue;
|
|
|
+ flag = true;
|
|
|
}
|
|
|
scale += num;
|
|
|
+ if (flag) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
iterator.remove();
|
|
|
}
|
|
|
}
|
|
@@ -442,12 +446,12 @@ public class PayServiceImpl implements PayService {
|
|
|
paymentChannelList.add(PaymentChannelEnum.ADAPAY);
|
|
|
|
|
|
BigDecimal monthHasReceipt = studentPaymentRouteOrderDao.getRouteOrderAmount(organId, paymentChannelList, monthStartTime);
|
|
|
- monthHasReceipt = monthHasReceipt == null ? BigDecimal.ZERO : monthHasReceipt;
|
|
|
+ monthHasReceipt = monthHasReceipt == null ? BigDecimal.ZERO : monthHasReceipt;
|
|
|
if (amount.add(monthHasReceipt).compareTo(monthMaxReceipt) >= 0) {
|
|
|
return true;
|
|
|
}
|
|
|
BigDecimal totalHasReceipt = studentPaymentRouteOrderDao.getRouteOrderAmount(organId, paymentChannelList, null);
|
|
|
- totalHasReceipt = totalHasReceipt == null ? BigDecimal.ZERO : totalHasReceipt;
|
|
|
+ totalHasReceipt = totalHasReceipt == null ? BigDecimal.ZERO : totalHasReceipt;
|
|
|
if (amount.add(totalHasReceipt).compareTo(totalMaxReceipt) >= 0) {
|
|
|
return true;
|
|
|
}
|