浏览代码

支付配置缓存时间修改

liweifan 3 年之前
父节点
当前提交
4fa0fea1d0

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/UserOrderPaymentServiceImpl.java

@@ -168,7 +168,7 @@ public class UserOrderPaymentServiceImpl extends ServiceImpl<UserOrderPaymentDao
 
         //付款请求
         BaseResult<Payment> paymentResBaseResult = paymentClient.executePayment(payment);
-        log.info("关单返回: {}", JSONObject.toJSONString(paymentResBaseResult));
+        log.info("付款返回: {}", JSONObject.toJSONString(paymentResBaseResult));
         if (paymentResBaseResult.getStatus()) {
             orderPayRes.setPay_amt(detail.getActualPrice().setScale(2, RoundingMode.HALF_UP).toString());
             String pay_info = paymentResBaseResult.getData().getPayInfo();

+ 3 - 2
toolset/toolset-payment/src/main/java/com/yonge/toolset/payment/core/service/impl/SysConfigPaymentServiceImpl.java

@@ -16,6 +16,7 @@ import org.slf4j.LoggerFactory;
 
 import javax.annotation.PostConstruct;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 
 
 @Service
@@ -32,7 +33,7 @@ public class SysConfigPaymentServiceImpl extends ServiceImpl<SysConfigPaymentDao
     private void init() {
         List<SysConfigPayment> sysConfigPayments = baseMapper.selectList(Wrappers.emptyWrapper());
         for (SysConfigPayment configPayment : sysConfigPayments) {
-            redissonClient.getBucket(REDIS_KEY + ":" + configPayment.getOpenType() + ":" + configPayment.getParamName()).set(configPayment);
+            redissonClient.getBucket(REDIS_KEY + ":" + configPayment.getOpenType() + ":" + configPayment.getParamName()).set(configPayment, 30, TimeUnit.MINUTES);
         }
     }
 
@@ -57,7 +58,7 @@ public class SysConfigPaymentServiceImpl extends ServiceImpl<SysConfigPaymentDao
                     .eq(SysConfigPayment::getClient, platform)
                     .eq(SysConfigPayment::getParamName, paramName)
             );
-            redissonClient.getBucket(REDIS_KEY + ":" + openType.getCode() + ":" + platform + ":" + paramName).set(configPayment);
+            redissonClient.getBucket(REDIS_KEY + ":" + openType.getCode() + ":" + platform + ":" + paramName).set(configPayment, 30, TimeUnit.MINUTES);
         }
         return configPayment;
     }