|
@@ -1,6 +1,7 @@
|
|
package com.fdkk.fdkkmeta.task;
|
|
package com.fdkk.fdkkmeta.task;
|
|
|
|
|
|
import cn.hutool.core.util.ArrayUtil;
|
|
import cn.hutool.core.util.ArrayUtil;
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
import com.fdkk.fdkkmeta.domain.entity.mysql.UserEntity;
|
|
import com.fdkk.fdkkmeta.domain.entity.mysql.UserEntity;
|
|
import com.fdkk.fdkkmeta.redis.RedisCache;
|
|
import com.fdkk.fdkkmeta.redis.RedisCache;
|
|
import com.fdkk.fdkkmeta.service.UserService;
|
|
import com.fdkk.fdkkmeta.service.UserService;
|
|
@@ -27,10 +28,12 @@ public class UpdateFrameMetaTask {
|
|
public void updateFrameMetadata(){
|
|
public void updateFrameMetadata(){
|
|
List<UserEntity> userOnline = userService.findUserOnline(true);
|
|
List<UserEntity> userOnline = userService.findUserOnline(true);
|
|
log.info("进入定时任务{}", ArrayUtil.isNotEmpty(userOnline)?userOnline.size():0);
|
|
log.info("进入定时任务{}", ArrayUtil.isNotEmpty(userOnline)?userOnline.size():0);
|
|
|
|
+// JSONObject a=new JSONObject();
|
|
|
|
+// a.put("123123",123123);
|
|
//使用并行流处理数据
|
|
//使用并行流处理数据
|
|
userOnline.parallelStream().forEach(
|
|
userOnline.parallelStream().forEach(
|
|
userEntity -> {
|
|
userEntity -> {
|
|
- redisCache.setCacheObject("updateFrameMetadata:"+userEntity.getUserId(),null);
|
|
|
|
|
|
+// redisCache.set("updateFrameMetadata:"+userEntity.getUserId(),a.toJSONString());
|
|
}
|
|
}
|
|
);
|
|
);
|
|
|
|
|