|
@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.fdkankan.common.constant.SceneConstant;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
+import com.fdkankan.redis.util.RedisUtil;
|
|
|
+import com.fdkankan.ucenter.common.RedisKeyUtil;
|
|
|
import com.fdkankan.ucenter.constant.LoginConstant;
|
|
|
import com.fdkankan.ucenter.entity.*;
|
|
|
import com.fdkankan.ucenter.httpClient.service.LaserService;
|
|
@@ -50,6 +52,8 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
|
|
|
ISceneResourceService sceneResourceService;
|
|
|
@Autowired
|
|
|
IUserService userService;
|
|
|
+ @Autowired
|
|
|
+ RedisUtil redisUtil;
|
|
|
|
|
|
@Override
|
|
|
public Long getCooperationSceneNum(Long userId, List<Integer> sceneSourceList) {
|
|
@@ -74,6 +78,9 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
|
|
|
this.removeByIds(ids);
|
|
|
sceneResourceCooperationService.deleteBatchByCooperationIds(ids);
|
|
|
}
|
|
|
+ for (String num : numList) {
|
|
|
+ redisUtil.hdel(RedisKeyUtil.SCENE_COOPERATION_NUM_USERID,num);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -97,6 +104,9 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
|
|
|
sceneCooperationEntity.setUpdateTime(DateUserUtil.getDate(new Date()));
|
|
|
list.add(sceneCooperationEntity);
|
|
|
}
|
|
|
+ for (SceneCooperation sceneCooperation : list) {
|
|
|
+ redisUtil.hset(RedisKeyUtil.SCENE_COOPERATION_NUM_USERID, sceneCooperation.getSceneNum(), sceneCooperation.getUserId() + "");
|
|
|
+ }
|
|
|
this.saveBatch(list);
|
|
|
|
|
|
if(resourceIdList.size() >0){
|