Commit b66c0f265ae9d36c87bb46f3abc5e155b61454dc

Authored by xp.Huang
1 parent 95482a9a

fix: 平台管理员首页统计

... ... @@ -41,14 +41,14 @@ public class HomePageController extends BaseController {
41 41 @ApiOperation(value = "获取左侧顶部信息")
42 42 public HomePageLeftTopDTO getLeftTopInfo()
43 43 throws ThingsboardException, ExecutionException, InterruptedException {
  44 + String customerId = null != getCurrentUser().getCustomerId() ? getCurrentUser().getCustomerId().getId().toString():null;
44 45 return homePageService.getHomePageLeftTopInfo(
45 46 getCurrentUser().isPtSysadmin(),
46 47 getCurrentUser().isPtAdmin(),
47 48 getCurrentUser().isPtTenantAdmin(),
48 49 getCurrentUser().isPtCommonTenant(),
49 50 getCurrentUser().getCurrentTenantId(),
50   - getCurrentUser().getCurrentUserId(),
51   - getCurrentUser().getCustomerId().getId().toString());
  51 + getCurrentUser().getCurrentUserId(),customerId);
52 52 }
53 53
54 54 @GetMapping("right/overdue")
... ...
... ... @@ -116,8 +116,7 @@ public class TkHomePageServiceImpl implements HomePageService {
116 116 todayBegin, todayEnd, currentTenantId, apiUsageState.getId(), messageInfo, alarm);
117 117
118 118 }else {
119   - List<String> tbDevices = null;
120   - List<BaseHomePageTop> alarmList = null;
  119 + List<BaseHomePageTop> alarmList;
121 120 long startTs = todayBegin.toInstant(ZoneOffset.of("+8")).toEpochMilli();
122 121 if(isPtCommonTenant){
123 122 //查询所有组织id
... ...