统计缓存增加租户

This commit is contained in:
zy 2026-03-19 17:10:30 +08:00
parent eb36d2bdea
commit 82b6641132
1 changed files with 2 additions and 2 deletions

View File

@ -516,12 +516,12 @@ public class BigScreenController {
@PostMapping("/getIndexSummry")
@ApiOperation("大屏首页统计")
public Result<List<ScreenIndexSummaryDetailVo>> getIndexSummry (@RequestBody ScreenSummaryVo screenSummaryVo){
iotTools.getTenantId(screenSummaryVo.getAuthId());
String tenantId= iotTools.getTenantId(screenSummaryVo.getAuthId());
List<ScreenIndexSummaryDetailVo> results = new ArrayList<>();
if(StringUtils.isBlank(screenSummaryVo.getSummrayMode())){//不传模式默认为天数据
screenSummaryVo.setSummrayMode(IotConstants.month_days);
}
String key = CacheConstants.BS_INDEX_STATISTIC_CACHE+screenSummaryVo.getSummrayMode();
String key = CacheConstants.BS_INDEX_STATISTIC_CACHE+tenantId +":"+screenSummaryVo.getSummrayMode();
String cache = oConvertUtils.getString(redisTemplate.opsForValue().get(key));
if(StringUtils.isNotBlank(cache)){
results = JSONArray.parseArray(cache,ScreenIndexSummaryDetailVo.class);