@@ -19,7 +19,7 @@ import java.util.Date; | |||
* @date 2023-02-07 | |||
*/ | |||
@Data | |||
public class WarningListVo implements Serializable { | |||
public class WarningListVo extends BaseEntity implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
@@ -29,10 +29,8 @@ public class QueryCameraListService { | |||
public JsonResult getList(QueryCameraListRequest request) { | |||
// log.info("进入查询监控列表业务"); | |||
// User user = ShiroUtils.getUserInfo(); | |||
// Integer tenantId = user.getTenantId(); | |||
Integer tenantId = 1; | |||
User user = ShiroUtils.getUserInfo(); | |||
Integer tenantId = user.getTenantId(); | |||
request.setTenantId(tenantId); | |||
JsonResult result = this.check(tenantId, request); |
@@ -40,7 +40,7 @@ public class QueryEmergencyListService { | |||
// User user = ShiroUtils.getUserInfo(); | |||
// Integer tenantId = user.getTenantId(); | |||
Integer tenantId = 1; | |||
throw new ServiceException( | |||
request.setTenantId(tenantId); | |||
JsonResult result = this.check(tenantId, request); |
@@ -8,6 +8,8 @@ import com.tuoheng.admin.entity.request.emergency.QueryMissionListRequest; | |||
import com.tuoheng.admin.enums.MarkEnum; | |||
import com.tuoheng.admin.mapper.ThMissionMapper; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import com.tuoheng.system.entity.User; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
@@ -30,10 +32,8 @@ public class QueryMissionListService { | |||
public JsonResult getList(QueryMissionListRequest request) { | |||
// log.info("进入查询任务列表业务"); | |||
// User user = ShiroUtils.getUserInfo(); | |||
// Integer tenantId = user.getTenantId(); | |||
Integer tenantId = 1; | |||
User user = ShiroUtils.getUserInfo(); | |||
Integer tenantId = user.getTenantId(); | |||
request.setTenantId(tenantId); | |||
JsonResult result = this.check(tenantId, request); |
@@ -21,6 +21,8 @@ import com.tuoheng.common.config.CommonConfig; | |||
import com.tuoheng.common.exception.ServiceException; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import com.tuoheng.common.utils.StringUtils; | |||
import com.tuoheng.system.entity.User; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
@@ -51,9 +53,8 @@ public class WarningDetailsService { | |||
private ThMissionMapper missionMapper; | |||
public JsonResult details(Integer id) { | |||
//User user = ShiroUtils.getUserInfo(); | |||
// Integer tenantId = user.getTenantId(); | |||
Integer tenantId = 1; | |||
User user = ShiroUtils.getUserInfo(); | |||
Integer tenantId = user.getTenantId(); | |||
//校验 | |||
if(null == id){ | |||
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); |
@@ -7,6 +7,8 @@ import com.tuoheng.admin.enums.MarkTypeEnum; | |||
import com.tuoheng.admin.enums.WarningStatusEnum; | |||
import com.tuoheng.admin.mapper.WarningMapper; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import com.tuoheng.system.entity.User; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
@@ -32,9 +34,8 @@ public class WarningNoticeService { | |||
*/ | |||
public JsonResult notice() { | |||
//当前登录用户 | |||
// User user = ShiroUtils.getUserInfo(); | |||
// Integer tenantId = ShiroUtils.getTenantId(); | |||
Integer tenantId = 1; | |||
User user = ShiroUtils.getUserInfo(); | |||
Integer tenantId = ShiroUtils.getTenantId(); | |||
//查询预警表是否有预警数据 | |||
List<Warning> warningList = warningMapper.selectList(Wrappers.<Warning>lambdaQuery() | |||
.eq(Warning::getTenantId, tenantId) |
@@ -16,6 +16,8 @@ import com.tuoheng.common.exception.ServiceException; | |||
import com.tuoheng.common.utils.DateUtils; | |||
import com.tuoheng.common.utils.JsonResult; | |||
import com.tuoheng.common.utils.StringUtils; | |||
import com.tuoheng.system.entity.User; | |||
import com.tuoheng.system.utils.ShiroUtils; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.springframework.beans.BeanUtils; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
@@ -47,9 +49,8 @@ public class QueryWarningPageListService { | |||
if (query.getLimit() == null && query.getPage() == null) { | |||
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); | |||
} | |||
// User user = ShiroUtils.getUserInfo(); | |||
// Integer tenantId = user.getTenantId(); | |||
Integer tenantId = 1; | |||
User user = ShiroUtils.getUserInfo(); | |||
Integer tenantId = user.getTenantId(); | |||
if (null == tenantId) { |