|
|
@@ -2480,8 +2480,10 @@ public class QwExternalContactServiceImpl extends ServiceImpl<QwExternalContactM
|
|
|
currentCount = 1L;
|
|
|
}
|
|
|
|
|
|
- long expireSeconds = getSecondsUntilMidnight();
|
|
|
- redisTemplate.expire(cacheKey, expireSeconds, java.util.concurrent.TimeUnit.SECONDS);
|
|
|
+ if (currentCount==1L){
|
|
|
+ long expireSeconds = getSecondsUntilMidnight();
|
|
|
+ redisTemplate.expire(cacheKey, expireSeconds, java.util.concurrent.TimeUnit.SECONDS);
|
|
|
+ }
|
|
|
|
|
|
if (currentCount >= limitCount) {
|
|
|
log.error("用户{}已达到每日添加上限{}/{}", userID, currentCount, limitCount);
|