This commit is contained in:
Lemon
2023-09-06 09:35:46 +08:00
3 changed files with 38 additions and 18 deletions

View File

@@ -244,6 +244,7 @@ public class TempController extends BaseController {
/** /**
* 运营商分账手动接口 * 运营商分账手动接口
* 前提条件是已经计算好订单日报了
* http://localhost:8080/temp/orderSplittingOperations * http://localhost:8080/temp/orderSplittingOperations
* *
* @return * @return
@@ -421,6 +422,18 @@ public class TempController extends BaseController {
} }
/** /**
* * 更新会员的余额充值记录
*/ */
public RestApiResponse<?> updateMemberAdapayRecord(ApplyRefundDTO dto) {
try {
List<String> memberIdList = dto.getMemberIdList();
for (String memberId : memberIdList) {
tempService.updateMemberAdapayRecord(memberId);
}
} catch (Exception e) {
logger.error("批量订单退款error", e);
}
return null;
}
} }

View File

@@ -441,4 +441,10 @@ public class TempService {
// logger.info("批量进行问题订单退款orderCode:{}, result:{}", orderBasicInfo.getOrderCode(), JSON.toJSONString(result)); // logger.info("批量进行问题订单退款orderCode:{}, result:{}", orderBasicInfo.getOrderCode(), JSON.toJSONString(result));
} }
} }
public void updateMemberAdapayRecord(String memberId) {
// 查询
List<MemberAdapayRecord> memberAdapayRecordList = memberAdapayRecordService.selectAdapayRecordList(memberId, ScenarioEnum.BALANCE.getValue());
}
} }

View File

@@ -7,7 +7,6 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.huifu.adapay.core.exception.BaseAdaPayException; import com.huifu.adapay.core.exception.BaseAdaPayException;
import com.jsowell.adapay.dto.QueryPaymentConfirmDTO; import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
import com.jsowell.adapay.operation.PaymentConfirmOperation;
import com.jsowell.adapay.operation.PaymentReverseOperation; import com.jsowell.adapay.operation.PaymentReverseOperation;
import com.jsowell.adapay.response.PaymentConfirmResponse; import com.jsowell.adapay.response.PaymentConfirmResponse;
import com.jsowell.adapay.response.PaymentReverseResponse; import com.jsowell.adapay.response.PaymentReverseResponse;
@@ -1435,16 +1434,17 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
BigDecimal deductionAmount = vo.getDeductionAmount(); BigDecimal deductionAmount = vo.getDeductionAmount();
// 延时分账使用确认交易API // 延时分账使用确认交易API
// PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(paymentId, adapayMemberAccount, deductionAmount, orderCode, wechatAppId); PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(paymentId,
adapayMemberAccount, deductionAmount, orderCode, wechatAppId);
// 换新的方法,逻辑不变,参数封装了 // 换新的方法,逻辑不变,参数封装了
PaymentConfirmOperation operation = new PaymentConfirmOperation(); // PaymentConfirmOperation operation = new PaymentConfirmOperation();
operation.setPaymentId(paymentId); // operation.setPaymentId(paymentId);
operation.setConfirmAmt(deductionAmount); // operation.setConfirmAmt(deductionAmount);
operation.setOrderCode(orderCode); // operation.setOrderCode(orderCode);
operation.setAdapayMemberId(adapayMemberAccount.getAdapayMemberId()); // operation.setAdapayMemberId(adapayMemberAccount.getAdapayMemberId());
operation.setMerchantKey(wechatAppId); // operation.setMerchantKey(wechatAppId);
PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(operation); // PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(operation);
if (paymentConfirmResponse != null && paymentConfirmResponse.isNotFailed()) { if (paymentConfirmResponse != null && paymentConfirmResponse.isNotFailed()) {
confirmAmt = confirmAmt.add(new BigDecimal(paymentConfirmResponse.getConfirm_amt())); confirmAmt = confirmAmt.add(new BigDecimal(paymentConfirmResponse.getConfirm_amt()));
@@ -1566,15 +1566,16 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
BigDecimal settleAmount = orderBasicInfo.getSettleAmount(); BigDecimal settleAmount = orderBasicInfo.getSettleAmount();
// 调汇付的分账接口 确认交易 // 调汇付的分账接口 确认交易
// PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(paymentId, adapayMemberAccount, settleAmount, orderCode, wechatAppId); PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(paymentId,
adapayMemberAccount, settleAmount, orderCode, wechatAppId);
PaymentConfirmOperation operation = new PaymentConfirmOperation(); // PaymentConfirmOperation operation = new PaymentConfirmOperation();
operation.setPaymentId(paymentId); // operation.setPaymentId(paymentId);
operation.setConfirmAmt(settleAmount); // operation.setConfirmAmt(settleAmount);
operation.setOrderCode(orderCode); // operation.setOrderCode(orderCode);
operation.setAdapayMemberId(adapayMemberAccount.getAdapayMemberId()); // operation.setAdapayMemberId(adapayMemberAccount.getAdapayMemberId());
operation.setMerchantKey(wechatAppId); // operation.setMerchantKey(wechatAppId);
PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(operation); // PaymentConfirmResponse paymentConfirmResponse = adapayService.createPaymentConfirmRequest(operation);
// 分账接口返回的信息 // 分账接口返回的信息