记得上下班打卡 | git大法好,push需谨慎

Commit 3e0c2ad8 authored by zhengfuxin's avatar zhengfuxin

修改热词

parent f69d27f6
...@@ -138,7 +138,7 @@ public class GoblinFrontHotWordServiceImpl extends ServiceImpl<GoblinFrontHotWor ...@@ -138,7 +138,7 @@ public class GoblinFrontHotWordServiceImpl extends ServiceImpl<GoblinFrontHotWor
} }
} }
GoblinFrontHotWord goblinFrontHotWord=list.get(0); /* GoblinFrontHotWord goblinFrontHotWord=list.get(0);
if(null!=goblinFrontHotWord){ if(null!=goblinFrontHotWord){
//redis //redis
if(null!=goblinFrontHotWord.getChangeTime()&&goblinFrontHotWord.getChangeTime()>0){ if(null!=goblinFrontHotWord.getChangeTime()&&goblinFrontHotWord.getChangeTime()>0){
...@@ -149,7 +149,8 @@ public class GoblinFrontHotWordServiceImpl extends ServiceImpl<GoblinFrontHotWor ...@@ -149,7 +149,8 @@ public class GoblinFrontHotWordServiceImpl extends ServiceImpl<GoblinFrontHotWor
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_HOTWORD_INDEX,0); redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_HOTWORD_INDEX,0);
} }
} }*/
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_HOTWORD,list);
return true; return true;
} }
......
...@@ -75,15 +75,15 @@ public class GoblinFrontController { ...@@ -75,15 +75,15 @@ public class GoblinFrontController {
int index= (int) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD_INDEX); int index= (int) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD_INDEX);
//获得value //获得value
List<GoblinFrontHotWord> list= (List<GoblinFrontHotWord>) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD); List<GoblinFrontHotWord> list= (List<GoblinFrontHotWord>) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD);
index++; /* index++;
String hotWord=""; String hotWord="";
redisUtil.set(GoblinRedisConst.FRONT_HOTWORD_INDEX,index); redisUtil.set(GoblinRedisConst.FRONT_HOTWORD_INDEX,index);
if(index<list.size()){ if(index<list.size()){
hotWord= list.get(index).getWord(); hotWord= list.get(index).getWord();
}else{ }else{
hotWord= list.get(0).getWord(); hotWord= list.get(0).getWord();
} }*/
return ResponseDto.success( hotWord ); return ResponseDto.success( list );
} }
@GetMapping("getNavigation") @GetMapping("getNavigation")
@ApiOperation("获得金刚栏") @ApiOperation("获得金刚栏")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment