对获取用户信息进行优化
This commit is contained in:
parent
67b80c13f3
commit
581ddd9582
|
|
@ -501,10 +501,16 @@ public class IotMachineServiceImpl implements IotMachineService {
|
|||
@Scheduled(fixedRate = 10800000)
|
||||
public int alarmPush() {
|
||||
log.info("开始获取报警信息====");
|
||||
List<MaTypeKeeper> maTypeKeeperList = new ArrayList<>();
|
||||
//获取当前登录用户的所有信息
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
//查看当前用户名下有哪些类型的设备
|
||||
List<MaTypeKeeper> maTypeKeeperList = maTypeMapper.selectMaTypeByUserId(userId);
|
||||
try {
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
//查看当前用户名下有哪些类型的设备
|
||||
maTypeKeeperList = maTypeMapper.selectMaTypeByUserId(userId);
|
||||
} catch (Exception e) {
|
||||
log.error("获取用户信息有误!!");
|
||||
return 0;
|
||||
}
|
||||
List<IotLocationVo> iotLocationVoAll = new ArrayList<>();
|
||||
for (int i = 0; i < maTypeKeeperList.size(); i++) {
|
||||
//查询该类机具有哪些设备绑定的iot设备
|
||||
|
|
|
|||
Loading…
Reference in New Issue