|
@@ -121,17 +121,17 @@ public class ApplyTaskCacheService implements CacheConstants {
|
|
|
* 获取某考点某时段的“已预约数量”
|
|
|
*/
|
|
|
public int getApplyFinishCount(Long examSiteId, Long timePeriodId) {
|
|
|
- String cacheKey = String.format(CACHE_APPLY_FINISH, examSiteId, timePeriodId);
|
|
|
- if (redisClient.exist(cacheKey)) {
|
|
|
- return (int) redisClient.getRedissonClient().getAtomicLong(cacheKey).get();
|
|
|
- }
|
|
|
-
|
|
|
- RAtomicLong atomic = redisClient.getRedissonClient().getAtomicLong(cacheKey);
|
|
|
+ // String cacheKey = String.format(CACHE_APPLY_FINISH, examSiteId, timePeriodId);
|
|
|
+ // if (redisClient.exist(cacheKey)) {
|
|
|
+ // return (int) redisClient.getRedissonClient().getAtomicLong(cacheKey).get();
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // RAtomicLong atomic = redisClient.getRedissonClient().getAtomicLong(cacheKey);
|
|
|
|
|
|
int value = studentApplyService.countApplyFinishForExamSiteAndTimePeriod(examSiteId, timePeriodId);
|
|
|
- atomic.set(value);
|
|
|
- atomic.expire(30, TimeUnit.DAYS);
|
|
|
- log.info("SET cacheKey:{} value:{}", cacheKey, value);
|
|
|
+ // atomic.set(value);
|
|
|
+ // atomic.expire(30, TimeUnit.DAYS);
|
|
|
+ // log.info("SET cacheKey:{} value:{}", cacheKey, value);
|
|
|
|
|
|
return value;
|
|
|
}
|