wangqifan 2 anos atrás
pai
commit
5942b5b8b3

+ 4 - 4
src/main/java/com/izouma/nineth/service/OrderService.java

@@ -664,7 +664,7 @@ public class OrderService {
         }
         Map<String, Object> expend = new HashMap<>();
         paymentParams.put("expend", expend);
-        if ("wx_pub" .equals(payChannel)) {
+        if ("wx_pub".equals(payChannel)) {
             if (StringUtils.isBlank(openId)) {
                 throw new BusinessException("缺少openId");
             }
@@ -673,7 +673,7 @@ public class OrderService {
         }
 
         Map<String, Object> response;
-        if ("wx_lite" .equals(payChannel)) {
+        if ("wx_lite".equals(payChannel)) {
             paymentParams.put("adapay_func_code", "wxpay.createOrder");
             paymentParams.put("callback_url", generalProperties.getHost() + "/9th/orders");
             response = AdapayCommon.requestAdapayUits(paymentParams);
@@ -1222,10 +1222,10 @@ public class OrderService {
     @Scheduled(cron = "0 0/3 * * * ?")
     public void setBlackList() {
         List<Long> userIds = orderRepo
-                .checkBlackList(LocalDateTime.now(), LocalDateTime.now().minusMinutes(30));
+                .checkBlackList(LocalDateTime.now(), LocalDateTime.now().minusMinutes(10));
         userIds.forEach(userId -> {
             if (redisTemplate.opsForValue().get(RedisKeys.BLACK_LIST + userId) == null) {
-                redisTemplate.opsForValue().set(RedisKeys.BLACK_LIST + userId, 1, Duration.ofSeconds(60 * 180));
+                redisTemplate.opsForValue().set(RedisKeys.BLACK_LIST + userId, 1, Duration.ofSeconds(60 * 10));
             }
         });
     }