|
|
|
@ -5,6 +5,7 @@ import au.com.royalpay.payment.channels.wechat.config.WeChatPayConfig;
|
|
|
|
|
import au.com.royalpay.payment.channels.wechat.config.WechatPayEnvironment;
|
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.MpPaymentApi;
|
|
|
|
|
import au.com.royalpay.payment.channels.wechat.runtime.beans.SettlementLog;
|
|
|
|
|
import au.com.royalpay.payment.core.exceptions.ChannelNetworkException;
|
|
|
|
|
import au.com.royalpay.payment.manage.analysis.core.PlatformClearService;
|
|
|
|
|
import au.com.royalpay.payment.manage.analysis.mappers.EstimateAnalysisMapper;
|
|
|
|
|
import au.com.royalpay.payment.manage.mappers.log.PlatformSettlementMapper;
|
|
|
|
@ -103,6 +104,7 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
|
|
|
|
|
doVerifyAlipayOnlineSettleLog(sdfClear.parse(end_date));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
logger.error("PlatformClearAnalysisServiceImpl.verifySettleLogByDate ==> 校验" + end_date + "支付宝Online到账失败:", e);
|
|
|
|
|
throw new ChannelNetworkException("校验失败:",e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.equals("Wechat", channel)) {
|
|
|
|
@ -352,6 +354,13 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
|
|
|
|
|
wechat_rate = new BigDecimal("0.005");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 2018-09-01后Alipay_Online手续费0.006
|
|
|
|
|
BigDecimal alipay_online_rate;
|
|
|
|
|
if (end_date.compareTo("2018-09-01 02:00:00") <= 0) {
|
|
|
|
|
alipay_online_rate = new BigDecimal("0.018");
|
|
|
|
|
} else {
|
|
|
|
|
alipay_online_rate = new BigDecimal("0.006");
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
JSONObject creditLogs = platformSettlementMapper.calculateSysSettleLog(start_date, end_date, channel, "Credit", wechat_rate);
|
|
|
|
|
sysLogs.put("sys_pay_fee", creditLogs.getBigDecimal("aud_amount"));
|
|
|
|
@ -363,7 +372,7 @@ public class PlatformClearAnalysisServiceImpl implements PlatformClearService {
|
|
|
|
|
if (StringUtils.equals("Alipay", channel)) {
|
|
|
|
|
sysLogs.put("sys_surcharge", platformSettlementMapper.calculateRmbCharge(start_date, end_date, channel, new BigDecimal(0.006)));
|
|
|
|
|
} else if (StringUtils.equals("AlipayOnline", channel)) {
|
|
|
|
|
sysLogs.put("sys_surcharge", platformSettlementMapper.calculateRmbCharge(start_date, end_date, channel, new BigDecimal(0.018)));
|
|
|
|
|
sysLogs.put("sys_surcharge", platformSettlementMapper.calculateRmbCharge(start_date, end_date, channel, alipay_online_rate));
|
|
|
|
|
} else {
|
|
|
|
|
sysLogs.put("sys_surcharge", creditLogs.getBigDecimal("charge_amount").subtract(debitLogs.getBigDecimal("charge_amount")));
|
|
|
|
|
}
|
|
|
|
|