|
|
|
@@ -14,10 +14,7 @@ import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.mapper.*; |
|
|
|
import com.iformall.pay.*; |
|
|
|
import com.iformall.service.*; |
|
|
|
import com.iformall.utils.BeanUtils; |
|
|
|
import com.iformall.utils.MapUtil; |
|
|
|
import com.iformall.utils.Utility; |
|
|
|
import com.iformall.utils.XmlUtil; |
|
|
|
import com.iformall.utils.*; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
@@ -219,8 +216,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(); |
|
|
|
int iChargeFee = PayUtils.getPayRate(record.getPayAmount(), payAccount.getRate()); |
|
|
|
Integer share_amount = record.getPayAmount() - iChargeFee; |
|
|
|
record.setShareAmount(share_amount); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -458,8 +455,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(); |
|
|
|
int iChargeFee = PayUtils.getPayRate(record.getPayAmount(), payAccount.getRate()); |
|
|
|
Integer share_amount = record.getPayAmount() - iChargeFee; |
|
|
|
record.setShareAmount(share_amount); |
|
|
|
if (share_amount <= 0) { |
|
|
|
isShare = EnumPayShare.NO; |
|
|
|
@@ -1532,12 +1529,4 @@ public class WxPayOrderServiceImpl implements WxPayOrderService { |
|
|
|
public void deleteById(Long id) { |
|
|
|
wxPayOrderMapper.deleteByPrimaryKey(id); |
|
|
|
} |
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
Integer v = 50; |
|
|
|
Integer rate = 6; |
|
|
|
Double dChargeFee = Math.ceil(v * 1.0D * 60 / 10000); |
|
|
|
Integer share_amount = v - dChargeFee.intValue(); |
|
|
|
System.out.println("share value " + share_amount); |
|
|
|
} |
|
|
|
} |