update 根据请求号,查询支付信息列表

This commit is contained in:
2024-04-12 17:05:53 +08:00
parent 362bb04d5b
commit 9afe92f15c

View File

@@ -161,7 +161,7 @@ public class AdapayService {
redisCache.setCacheObject(redisKey, resultMap, 15, TimeUnit.MINUTES);
// 请求订单号放redis
redisCache.setCacheObject(CacheConstants.ORDER_WECHAT_PAY_PARAMETERS + dto.getOrderCode(), orderNo, 60, TimeUnit.MINUTES);
redisCache.setCacheObject(CacheConstants.ORDER_WECHAT_PAY_PARAMETERS + dto.getOrderCode(), orderNo, CacheConstants.cache_expire_time_10d);
}
return resultMap;
}
@@ -1199,16 +1199,16 @@ public class AdapayService {
public List<PaymentInfo> queryPaymentInfosByOrderNo(String orderNo, String wechatAppId) throws BaseAdaPayException {
List<PaymentInfo> resultList = Lists.newArrayList();
List<AdaPayment> adaPayments = queryPaymentsByOrderNo(orderNo, wechatAppId);
if (CollectionUtils.isEmpty(adaPayments)) {
return resultList;
}
for (AdaPayment adaPayment : adaPayments) {
PaymentInfo paymentInfo = PaymentInfo.builder()
.paymentId(adaPayment.getId())
.amount(adaPayment.getPay_amt())
.build();
resultList.add(paymentInfo);
if (CollectionUtils.isNotEmpty(adaPayments)) {
for (AdaPayment adaPayment : adaPayments) {
PaymentInfo paymentInfo = PaymentInfo.builder()
.paymentId(adaPayment.getId())
.amount(adaPayment.getPay_amt())
.build();
resultList.add(paymentInfo);
}
}
log.info("根据请求号:{}, wechatAppId:{}, 查询支付信息列表:{}", orderNo, wechatAppId, JSON.toJSONString(resultList));
return resultList;
}