Просмотр исходного кода

[微信分账][修改]:支付四舍五入

release_toaliyun_real
Stormeye Wu 7 лет назад
Родитель
Сommit
6224e6bf14
1 измененных файлов: 2 добавлений и 2 удалений
  1. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java

+ 2
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxPayOrderServiceImpl.java Просмотреть файл

@@ -429,8 +429,8 @@ public class WxPayOrderServiceImpl implements WxPayOrderService {
record.setShare(isShare.getCode());
if (isShare == EnumPayShare.YES) {
// 分账金额
Double dChargeFee = Math.ceil(record.getPayAmount() * 1.0D * payAccount.getRate() / 10000);
Integer share_amount = record.getPayAmount() - dChargeFee.intValue();
Integer dChargeFee = Math.round(record.getPayAmount() * 1.0F * payAccount.getRate() / 10000);
Integer share_amount = record.getPayAmount() - dChargeFee;
record.setShareAmount(share_amount);
if (share_amount <= 0) {
isShare = EnumPayShare.NO;


Загрузка…
Отмена
Сохранить