This commit is contained in:
2023-10-13 16:12:06 +08:00
parent b375b68a13
commit c4bc83df05

View File

@@ -35,7 +35,6 @@ import com.jsowell.common.util.bean.BeanUtils;
import com.jsowell.common.util.id.IdUtils; import com.jsowell.common.util.id.IdUtils;
import com.jsowell.common.util.id.SnowflakeIdWorker; import com.jsowell.common.util.id.SnowflakeIdWorker;
import com.jsowell.pile.domain.*; import com.jsowell.pile.domain.*;
import com.jsowell.pile.domain.nanrui.NROrderInfo;
import com.jsowell.pile.dto.*; import com.jsowell.pile.dto.*;
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO; import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
import com.jsowell.pile.mapper.OrderBasicInfoMapper; import com.jsowell.pile.mapper.OrderBasicInfoMapper;
@@ -2559,9 +2558,6 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
PaymentReverseResponse response = adapayService.createPaymentReverseRequest(operation); PaymentReverseResponse response = adapayService.createPaymentReverseRequest(operation);
if (response != null && response.isNotFailed()) { if (response != null && response.isNotFailed()) {
refundAmt = new BigDecimal(response.getReverse_amt()); refundAmt = new BigDecimal(response.getReverse_amt());
// BigDecimal spendAmt = callbackRecord.getPayAmt().subtract(refundAmt);
// memberAdapayRecordService.commonUpdateAmountMethod(paymentId, spendAmt, reverseAmt, null);
/* /*
不管是撤销还是退款都需要更新memberAdapayRecord中的金额, 解冻金额就是支付的金额,退款金额就是订单结算后需要退的金额 不管是撤销还是退款都需要更新memberAdapayRecord中的金额, 解冻金额就是支付的金额,退款金额就是订单结算后需要退的金额
延时分账的,可以部分解冻 延时分账的,可以部分解冻
@@ -2575,9 +2571,6 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
if (refundRequest != null && refundRequest.isNotFailed()) { if (refundRequest != null && refundRequest.isNotFailed()) {
refundAmt = new BigDecimal(refundRequest.getRefund_amt()); refundAmt = new BigDecimal(refundRequest.getRefund_amt());
// 更新此笔交易单的消费金额 = 支付金额 - 撤销金额 // 更新此笔交易单的消费金额 = 支付金额 - 撤销金额
// BigDecimal spendAmt = callbackRecord.getPayAmt().subtract(refundAmt);
// memberAdapayRecordService.commonUpdateAmountMethod(paymentId, spendAmt, refundAmt, null);
/* /*
不管是撤销还是退款都需要更新memberAdapayRecord中的金额, 解冻金额就是支付的金额,退款金额就是订单结算后需要退的金额 不管是撤销还是退款都需要更新memberAdapayRecord中的金额, 解冻金额就是支付的金额,退款金额就是订单结算后需要退的金额
实时分账的,可以全部解冻 实时分账的,可以全部解冻
@@ -3013,19 +3006,6 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
List<PaymentReverseResponse> paymentReverses = queryOrderAdapayRefund(orderBasicInfo); List<PaymentReverseResponse> paymentReverses = queryOrderAdapayRefund(orderBasicInfo);
if (CollectionUtils.isEmpty(paymentReverses)) { if (CollectionUtils.isEmpty(paymentReverses)) {
// 如果没有退款过,重新执行一遍退款 // 如果没有退款过,重新执行一遍退款
// PaymentReverseResponse response = adapayService.createPaymentReverseRequest(
// paymentId, refundAmount, wechatAppId, memberId, ScenarioEnum.ORDER.getValue(),
// orderCode);
// PaymentReverseOperation operation = new PaymentReverseOperation();
// operation.setPaymentId(paymentId);
// operation.setReverseAmt(refundAmount);
// operation.setMerchantKey(wechatAppId);
// operation.setMemberId(memberId);
// operation.setScenarioType(ScenarioEnum.ORDER.getValue());
// operation.setOrderCode(orderCode);
// PaymentReverseResponse response = adapayService.createPaymentReverseRequest(operation);
ApplyRefundDTO applyRefundDTO = new ApplyRefundDTO(); ApplyRefundDTO applyRefundDTO = new ApplyRefundDTO();
applyRefundDTO.setOrderCode(orderCode); applyRefundDTO.setOrderCode(orderCode);
applyRefundDTO.setRefundType(Constants.ONE); applyRefundDTO.setRefundType(Constants.ONE);