mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 分账方法
This commit is contained in:
@@ -162,9 +162,9 @@ public interface IOrderBasicInfoService {
|
||||
* @return
|
||||
* @throws BaseAdaPayException
|
||||
*/
|
||||
OrderSettleResult doPaymentConfirm(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount) throws BaseAdaPayException;
|
||||
OrderSettleResult doPaymentConfirm(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount, String wechatAppId) throws BaseAdaPayException;
|
||||
|
||||
/**
|
||||
/**
|
||||
* 批量查询订单
|
||||
* @param orderCodeList
|
||||
* @return
|
||||
|
||||
@@ -998,6 +998,8 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
clearingBillInfo.setMerchantId(orderReport.getMerchantId());
|
||||
clearingBillInfo.setOrderSource("1");
|
||||
|
||||
String appId = pileMerchantInfoService.queryAppIdByMerchantId(orderReport.getMerchantId());
|
||||
|
||||
// 应收金额
|
||||
BigDecimal receivableAmount = BigDecimal.ZERO;
|
||||
// 应清分金额
|
||||
@@ -1020,7 +1022,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
orderSettleResult = doBalancePayment(orderBasicInfo, adapayMemberAccount);
|
||||
} else {
|
||||
// 在线支付,进行支付确认分账
|
||||
orderSettleResult = doPaymentConfirm(orderBasicInfo, adapayMemberAccount);
|
||||
orderSettleResult = doPaymentConfirm(orderBasicInfo, adapayMemberAccount, appId);
|
||||
}
|
||||
if (orderSettleResult != null && AdapayStatusEnum.SUCCEEDED.getValue().equals(orderSettleResult.getStatus())) {
|
||||
// 应收金额 = 订单结算金额汇总
|
||||
@@ -1098,6 +1100,8 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
return;
|
||||
}
|
||||
|
||||
String appId = pileMerchantInfoService.queryAppIdByMerchantId(merchantId);
|
||||
|
||||
// 根据交易日期查询运营商下面所有站点的交易日报
|
||||
List<SettleOrderReport> stationReportList = settleOrderReportService.selectByMerchantIdAndDate(merchantId, tradeDate);
|
||||
for (SettleOrderReport orderReport : stationReportList) {
|
||||
@@ -1124,7 +1128,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
// orderSettleResult = doBalancePayment(orderBasicInfo, adapayMemberAccount);
|
||||
} else {
|
||||
// 在线支付,进行支付确认分账
|
||||
orderSettleResult = doPaymentConfirm(orderBasicInfo, adapayMemberAccount);
|
||||
orderSettleResult = doPaymentConfirm(orderBasicInfo, adapayMemberAccount, appId);
|
||||
}
|
||||
// if (orderSettleResult != null && AdapayStatusEnum.SUCCEEDED.getValue().equals(orderSettleResult.getStatus())) {
|
||||
// JSONObject jsonObject = JSON.parseObject(orderSettleResult.getDescription());
|
||||
@@ -1239,7 +1243,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
* @throws BaseAdaPayException
|
||||
*/
|
||||
@Override
|
||||
public OrderSettleResult doPaymentConfirm(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount) throws BaseAdaPayException {
|
||||
public OrderSettleResult doPaymentConfirm(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount, String wechatAppId) throws BaseAdaPayException {
|
||||
// 查询订单的交易id
|
||||
AdapayCallbackRecord adapayCallbackRecord = adapayCallbackRecordService.selectByOrderCode(orderBasicInfo.getOrderCode());
|
||||
if (adapayCallbackRecord == null) {
|
||||
@@ -1269,7 +1273,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
||||
divMember.setAmount(settleAmount);
|
||||
divMember.setFee_flag(Constants.Y);
|
||||
confirmParams.put("div_members", Lists.newArrayList(divMember));
|
||||
Map<String, Object> paymentConfirm = PaymentConfirm.create(confirmParams);
|
||||
Map<String, Object> paymentConfirm = PaymentConfirm.create(confirmParams, wechatAppId);
|
||||
logger.info("调分账接口param:{}, result:{}", JSON.toJSONString(confirmParams), JSON.toJSONString(paymentConfirm));
|
||||
|
||||
// 分账接口返回的信息
|
||||
|
||||
Reference in New Issue
Block a user