Browse Source

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

release_toaliyun_real
Stormeye Wu 7 years ago
parent
commit
47a7a111cc
1 changed files with 2 additions and 2 deletions
  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 View File

@@ -168,8 +168,8 @@ public class WxPayOrderServiceImpl implements WxPayOrderService {
record.setShare(isShare.getCode()); record.setShare(isShare.getCode());
if (isShare == EnumPayShare.YES) { 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); record.setShareAmount(share_amount);
} }




Loading…
Cancel
Save