123
This commit is contained in:
@@ -69,7 +69,7 @@ public class BusOp {
|
||||
List<SysOperLog> list = sysOperLogMapper.selectList(Wrappers.lambdaUpdate(SysOperLog.class)
|
||||
.lt(SysOperLog::getOperTime, copyTimeFlag)
|
||||
.last("limit 300"));
|
||||
if(current > 500 || CollectionUtils.isEmpty(list)){
|
||||
if(current > 1000 || CollectionUtils.isEmpty(list)){
|
||||
break;
|
||||
}
|
||||
current++;
|
||||
|
||||
@@ -28,10 +28,11 @@ public class DynamicTotalCache {
|
||||
return String.format(RedisHttpConstant.DYNAMIC_TOTAL_CACHE_REDIS,now,userId);
|
||||
}
|
||||
|
||||
public void add(Long userId){
|
||||
public Long add(Long userId){
|
||||
String key = getKey(userId);
|
||||
redisTemplate.opsForValue().increment(key);
|
||||
Long increment = redisTemplate.opsForValue().increment(key);
|
||||
redisTemplate.expire(key,1, TimeUnit.DAYS);
|
||||
return increment;
|
||||
}
|
||||
|
||||
public int get(Long userId){
|
||||
|
||||
@@ -160,6 +160,7 @@ public class DynamicServiceImpl extends ServiceImpl<DynamicMapper, Dynamic> impl
|
||||
dynamicImages.add(po);
|
||||
}
|
||||
dynamicImagesService.saveBatch(dynamicImages);
|
||||
dynamicTotalCache.add(dynamic.getUserId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user