|
|
@@ -1002,9 +1002,11 @@ public class OrderService {
|
|
|
@Scheduled(cron = "0 0/3 * * * ?")
|
|
|
public void setBlackList() {
|
|
|
List<Long> userIds = orderRepo
|
|
|
- .checkBlackList(LocalDateTime.now(), LocalDateTime.now().minusHours(1));
|
|
|
+ .checkBlackList(LocalDateTime.now(), LocalDateTime.now().minusMinutes(30));
|
|
|
userIds.forEach(userId -> {
|
|
|
- redisTemplate.opsForValue().set(RedisKeys.BLACK_LIST + userId, 10, Duration.ofSeconds(60 * 180));
|
|
|
+ if (redisTemplate.opsForValue().get(RedisKeys.BLACK_LIST + userId) == null) {
|
|
|
+ redisTemplate.opsForValue().set(RedisKeys.BLACK_LIST + userId, 1, Duration.ofSeconds(60 * 180));
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
|