|
@@ -10,6 +10,7 @@ import com.fdkankan.common.constant.SceneKind;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
import com.fdkankan.rabbitmq.bean.BuildSceneCallMessage;
|
|
|
import com.fdkankan.rabbitmq.util.RabbitMqProducer;
|
|
|
+import com.fdkankan.redis.constant.RedisKey;
|
|
|
import com.fdkankan.ucenter.common.PageInfo;
|
|
|
import com.fdkankan.common.util.FileUtils;
|
|
|
import com.fdkankan.common.util.JwtUtil;
|
|
@@ -98,7 +99,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
@Autowired
|
|
|
private RedisUtil redisUtil;
|
|
|
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private ISceneUpgradeMapper sceneUpgradeMapper;
|
|
|
|
|
|
@Autowired
|
|
@@ -717,9 +718,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
|
|
|
@Override
|
|
|
public void updateViewCount(String num) {
|
|
|
- String redisKey = RedisKeyUtil.SCENE_VIEW_COUNT + num;
|
|
|
- if(!redisUtil.hasKey(redisKey)){
|
|
|
- Integer count = null;
|
|
|
+ String redisKey = RedisKey.SCENE_VISIT_CNT;
|
|
|
+ if(!redisUtil.hHasKey(redisKey,num)){
|
|
|
+ Integer count = 0;
|
|
|
ScenePro pro = this.getByNum(num);
|
|
|
if(pro !=null){
|
|
|
count = pro.getViewCount();
|
|
@@ -730,13 +731,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
count = scenePlusExt.getViewCount();
|
|
|
}
|
|
|
}
|
|
|
- if(count !=null){
|
|
|
- redisUtil.set(redisKey,String.valueOf(count));
|
|
|
- }
|
|
|
- }
|
|
|
- if(redisUtil.hasKey(redisKey)){
|
|
|
- redisUtil.incr(redisKey,1);
|
|
|
+ redisUtil.hset(redisKey,num,String.valueOf(count));
|
|
|
}
|
|
|
+ redisUtil.hincr(redisKey,num,1);
|
|
|
}
|
|
|
|
|
|
@Override
|