This commit is contained in:
2023-07-28 14:23:21 +08:00
parent c21d2586cc
commit 82a964d70e
2 changed files with 15 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
package com.jsowell.pile.service;
import com.huifu.adapay.core.exception.BaseAdaPayException;
import com.jsowell.adapay.response.PaymentConfirmResponse;
import com.jsowell.common.core.domain.ykc.RealTimeMonitorData;
import com.jsowell.common.core.domain.ykc.TransactionRecordsData;
import com.jsowell.pile.domain.AdapayMemberAccount;
@@ -143,7 +144,14 @@ public interface IOrderBasicInfoService {
void orderSplittingOperations(String merchantId, String tradeDate);
void doPaymentConfirm(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount) throws BaseAdaPayException;
/**
* 执行订单分账
* @param orderBasicInfo
* @param adapayMemberAccount
* @return
* @throws BaseAdaPayException
*/
PaymentConfirmResponse doPaymentConfirm(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount) throws BaseAdaPayException;
/**
* 批量查询订单

View File

@@ -16,6 +16,7 @@ import com.huifu.adapay.model.PaymentReverse;
import com.huifu.adapay.model.Refund;
import com.jsowell.adapay.common.CreateAdaPaymentParam;
import com.jsowell.adapay.common.DivMember;
import com.jsowell.adapay.response.PaymentConfirmResponse;
import com.jsowell.common.constant.CacheConstants;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
@@ -44,7 +45,6 @@ import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
import com.jsowell.pile.vo.uniapp.*;
import com.jsowell.pile.vo.web.*;
import com.jsowell.wxpay.common.WeChatPayParameter;
import com.jsowell.pile.dto.ApplyRefundDTO;
import com.jsowell.wxpay.dto.WechatSendMsgDTO;
import com.jsowell.wxpay.response.WechatPayRefundRequest;
import com.jsowell.wxpay.response.WechatPayRefundResponse;
@@ -907,7 +907,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
// 执行分账
orderBasicInfos.parallelStream().forEach(x -> {
try {
doPaymentConfirm(x, adapayMemberAccount);
PaymentConfirmResponse paymentConfirmResponse = doPaymentConfirm(x, adapayMemberAccount);
} catch (Exception e) {
logger.error("订单交易确认失败:{}", x.getOrderCode(), e);
}
@@ -922,7 +922,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
* @throws BaseAdaPayException
*/
@Override
public void doPaymentConfirm(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount) throws BaseAdaPayException {
public PaymentConfirmResponse doPaymentConfirm(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount) throws BaseAdaPayException {
// 查询订单的交易id
AdapayCallbackRecord adapayCallbackRecord = adapayCallbackRecordService.selectByOrderCode(orderBasicInfo.getOrderCode());
if (adapayCallbackRecord == null) {
@@ -958,8 +958,9 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
confirmParams.put("div_members", Lists.newArrayList(divMember));
Map<String, Object> paymentConfirm = PaymentConfirm.create(confirmParams);
logger.info("调分账接口param:{}, result:{}", JSON.toJSONString(confirmParams), JSON.toJSONString(paymentConfirm));
// 保存分账接口返回的信息
// 分账接口返回的信息
PaymentConfirmResponse response = JSONObject.parseObject(JSON.toJSONString(paymentConfirm), PaymentConfirmResponse.class);
return response;
}
// uniApp 发送停止充电订阅消息