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

Commit 3e0c2ad8 authored by zhengfuxin's avatar zhengfuxin

修改热词

parent f69d27f6
......@@ -138,7 +138,7 @@ public class GoblinFrontHotWordServiceImpl extends ServiceImpl<GoblinFrontHotWor
}
}
GoblinFrontHotWord goblinFrontHotWord=list.get(0);
/* GoblinFrontHotWord goblinFrontHotWord=list.get(0);
if(null!=goblinFrontHotWord){
//redis
if(null!=goblinFrontHotWord.getChangeTime()&&goblinFrontHotWord.getChangeTime()>0){
......@@ -149,7 +149,8 @@ public class GoblinFrontHotWordServiceImpl extends ServiceImpl<GoblinFrontHotWor
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_HOTWORD_INDEX,0);
}
}
}*/
redisDataSourceUtil.getRedisGoblinUtil().set(GoblinRedisConst.FRONT_HOTWORD,list);
return true;
}
......
......@@ -75,15 +75,15 @@ public class GoblinFrontController {
int index= (int) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD_INDEX);
//获得value
List<GoblinFrontHotWord> list= (List<GoblinFrontHotWord>) redisUtil.get(GoblinRedisConst.FRONT_HOTWORD);
index++;
/* index++;
String hotWord="";
redisUtil.set(GoblinRedisConst.FRONT_HOTWORD_INDEX,index);
if(index<list.size()){
hotWord= list.get(index).getWord();
}else{
hotWord= list.get(0).getWord();
}
return ResponseDto.success( hotWord );
}*/
return ResponseDto.success( list );
}
@GetMapping("getNavigation")
@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