|
|
@@ -168,7 +168,7 @@ 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() / 1000); |
|
|
|
|
|
|
|
|
Double dChargeFee = Math.ceil(record.getPayAmount() * 1.0D * payAccount.getRate() / 10000); |
|
|
Integer share_amount = record.getPayAmount() - dChargeFee.intValue(); |
|
|
Integer share_amount = record.getPayAmount() - dChargeFee.intValue(); |
|
|
record.setShareAmount(share_amount); |
|
|
record.setShareAmount(share_amount); |
|
|
} |
|
|
} |
|
|
@@ -429,7 +429,7 @@ 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() / 1000); |
|
|
|
|
|
|
|
|
Double dChargeFee = Math.ceil(record.getPayAmount() * 1.0D * payAccount.getRate() / 10000); |
|
|
Integer share_amount = record.getPayAmount() - dChargeFee.intValue(); |
|
|
Integer share_amount = record.getPayAmount() - dChargeFee.intValue(); |
|
|
record.setShareAmount(share_amount); |
|
|
record.setShareAmount(share_amount); |
|
|
if (share_amount <= 0) { |
|
|
if (share_amount <= 0) { |
|
|
@@ -1501,7 +1501,7 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { |
|
|
public static void main(String[] args) { |
|
|
public static void main(String[] args) { |
|
|
Integer v = 50; |
|
|
Integer v = 50; |
|
|
Integer rate = 6; |
|
|
Integer rate = 6; |
|
|
Double dChargeFee = Math.ceil(v * 1.0D * 6 / 1000); |
|
|
|
|
|
|
|
|
Double dChargeFee = Math.ceil(v * 1.0D * 6 / 10000); |
|
|
Integer share_amount = v - dChargeFee.intValue(); |
|
|
Integer share_amount = v - dChargeFee.intValue(); |
|
|
System.out.println("share value " + share_amount); |
|
|
System.out.println("share value " + share_amount); |
|
|
} |
|
|
} |
|
|
|