同步重庆代码

This commit is contained in:
sxu 2024-08-15 15:11:03 +08:00
parent 49b8fdf347
commit aabc0e3e0d
1 changed files with 10 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import com.alibaba.fastjson2.JSONObject;
import com.bonus.sgzb.base.domain.MaTypeKeeper;
import com.bonus.sgzb.base.mapper.MaTypeMapper;
import com.bonus.sgzb.common.core.constant.HttpStatus;
import com.bonus.sgzb.common.core.constant.RoleConstans;
import com.bonus.sgzb.common.core.constant.TokenConstants;
import com.bonus.sgzb.common.core.exception.ServiceException;
import com.bonus.sgzb.common.core.utils.DateUtils;
@ -500,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设备