Commit c3eb7653 by Lem

去除缓存

parent 2c2dc7a7
...@@ -363,13 +363,12 @@ public class MatchServiceImpl implements MatchService { ...@@ -363,13 +363,12 @@ public class MatchServiceImpl implements MatchService {
@Override @Override
public ResponseData<?> getTeamInfoList(CommonPage commonPage, HttpServletRequest request) { public ResponseData<?> getTeamInfoList(CommonPage commonPage, HttpServletRequest request) {
int jumpNum = (commonPage.getPageNum() - 1) * commonPage.getPageSize(); int jumpNum = (commonPage.getPageNum() - 1) * commonPage.getPageSize();
String key = RedisKeySplicing.requestLock("getTeamInfoList", JSON.toJSONString(commonPage));
if (redisUtilsService.existsKey(key)) { // if (redisUtilsService.existsKey(key)) {
String cacheInfo = redisUtilsService.getCacheStringInfo(key); // String cacheInfo = redisUtilsService.getCacheStringInfo(key);
GetTeamInfoListResponse response = JSONObject.toJavaObject(JSONObject.parseObject(cacheInfo), GetTeamInfoListResponse.class); // GetTeamInfoListResponse response = JSONObject.toJavaObject(JSONObject.parseObject(cacheInfo), GetTeamInfoListResponse.class);
return ResponseData.successResponse(response); // return ResponseData.successResponse(response);
} // }
List<Team> teams = teamMapper.selectList(Wrappers.<Team>lambdaQuery() List<Team> teams = teamMapper.selectList(Wrappers.<Team>lambdaQuery()
.eq(Team::getDeleted, 0) .eq(Team::getDeleted, 0)
...@@ -418,7 +417,7 @@ public class MatchServiceImpl implements MatchService { ...@@ -418,7 +417,7 @@ public class MatchServiceImpl implements MatchService {
response.getOtherTeam().getDataList().add(teamInfo); response.getOtherTeam().getDataList().add(teamInfo);
} }
redisUtilsService.cacheStringInfoByDay(key, JSON.toJSONString(response), 7); // redisUtilsService.cacheStringInfoByDay(key, JSON.toJSONString(response), 7);
return ResponseData.successResponse(response); return ResponseData.successResponse(response);
} }
......
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