mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-08 03:50:13 +08:00
update 重试订单退款接口
This commit is contained in:
@@ -701,7 +701,7 @@ public class AdapayMemberService {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public List<PaymentReverse> queryPaymentReverse(String paymentId, String wechatAppId) throws BaseAdaPayException {
|
public List<PaymentReverseResponse> queryPaymentReverse(String paymentId, String wechatAppId) throws BaseAdaPayException {
|
||||||
AbstractAdapayConfig config = AdapayConfigFactory.getConfig(wechatAppId);
|
AbstractAdapayConfig config = AdapayConfigFactory.getConfig(wechatAppId);
|
||||||
if (config == null) {
|
if (config == null) {
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_ADAPAY_CONFIG_IS_NULL_ERROR);
|
throw new BusinessException(ReturnCodeEnum.CODE_ADAPAY_CONFIG_IS_NULL_ERROR);
|
||||||
@@ -711,7 +711,7 @@ public class AdapayMemberService {
|
|||||||
reverse.put("app_id", config.getAdapayAppId());
|
reverse.put("app_id", config.getAdapayAppId());
|
||||||
Map<String, Object> response = PaymentReverse.queryList(reverse, config.getWechatAppId());
|
Map<String, Object> response = PaymentReverse.queryList(reverse, config.getWechatAppId());
|
||||||
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(response));
|
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(response));
|
||||||
List<PaymentReverse> payment_reverses = jsonObject.getList("payment_reverses", PaymentReverse.class);
|
List<PaymentReverseResponse> payment_reverses = jsonObject.getList("payment_reverses", PaymentReverseResponse.class);
|
||||||
return payment_reverses;
|
return payment_reverses;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import com.google.common.collect.Sets;
|
|||||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||||
import com.huifu.adapay.model.Payment;
|
import com.huifu.adapay.model.Payment;
|
||||||
import com.huifu.adapay.model.PaymentConfirm;
|
import com.huifu.adapay.model.PaymentConfirm;
|
||||||
import com.huifu.adapay.model.PaymentReverse;
|
|
||||||
import com.jsowell.adapay.common.CreateAdaPaymentParam;
|
import com.jsowell.adapay.common.CreateAdaPaymentParam;
|
||||||
import com.jsowell.adapay.common.DivMember;
|
import com.jsowell.adapay.common.DivMember;
|
||||||
import com.jsowell.adapay.config.AbstractAdapayConfig;
|
import com.jsowell.adapay.config.AbstractAdapayConfig;
|
||||||
@@ -2796,14 +2795,14 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
String paymentId = adapayCallbackRecord.getPaymentId();
|
String paymentId = adapayCallbackRecord.getPaymentId();
|
||||||
String memberId = orderBasicInfo.getMemberId();
|
String memberId = orderBasicInfo.getMemberId();
|
||||||
BigDecimal refundAmount = orderBasicInfo.getRefundAmount();
|
BigDecimal refundAmount = orderBasicInfo.getRefundAmount();
|
||||||
List<PaymentReverse> paymentReverses = adapayMemberService.queryPaymentReverse(paymentId, wechatAppId);
|
List<PaymentReverseResponse> paymentReverses = adapayMemberService.queryPaymentReverse(paymentId, wechatAppId);
|
||||||
if (CollectionUtils.isEmpty(paymentReverses)) {
|
if (CollectionUtils.isEmpty(paymentReverses)) {
|
||||||
// 如果没有退款过,重新执行一遍退款
|
// 如果没有退款过,重新执行一遍退款
|
||||||
PaymentReverseResponse response = adapayMemberService.createPaymentReverseRequest(
|
PaymentReverseResponse response = adapayMemberService.createPaymentReverseRequest(
|
||||||
paymentId, refundAmount, wechatAppId, memberId, ScenarioEnum.ORDER.getValue(),
|
paymentId, refundAmount, wechatAppId, memberId, ScenarioEnum.ORDER.getValue(),
|
||||||
orderCode);
|
orderCode);
|
||||||
|
logger.info("重试订单退款response:{}", JSON.toJSONString(response));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user