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