update 查询支付回调记录加缓存

This commit is contained in:
2023-05-30 16:20:03 +08:00
parent 6e8b06b433
commit 53bb941e7c
6 changed files with 58 additions and 8 deletions

View File

@@ -16,6 +16,7 @@ import com.huifu.adapay.core.exception.BaseAdaPayException;
import com.huifu.adapay.core.util.AdapaySign;
import com.huifu.adapay.model.Payment;
import com.jsowell.adapay.common.CreateAdaPaymentParam;
import com.jsowell.common.constant.CacheConstants;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.domain.entity.SysDictData;
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
@@ -252,7 +253,7 @@ public class OrderService {
private Map<String, Object> adapayPayOrder(PayOrderDTO dto) {
log.info("===============使用汇付支付");
// 相同参数重复请求,返回同一个支付对象
String redisKey = "ADAPAY_ORDER_PARAM:" + dto.getOrderCode();
String redisKey = CacheConstants.ADAPAY_ORDER_PARAM + dto.getOrderCode();
Map<String, Object> cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null) {
return cacheObject;
@@ -312,7 +313,7 @@ public class OrderService {
*/
private Map<String, Object> wechatPayOrder(PayOrderDTO dto) throws Exception {
// 相同参数重复请求,返回同一个支付对象
String redisKey = "WECHAT_PAY_ORDER_PARAM:" + dto.getOrderCode();
String redisKey = CacheConstants.WECHAT_PAY_ORDER_PARAM + dto.getOrderCode();
Map<String, Object> cacheObject = redisCache.getCacheObject(redisKey);
if (cacheObject != null) {
return cacheObject;