@@ -10,7 +10,8 @@ public enum SectionEnum { | |||
USER_IS_NOT_EXIST(1220301, "用户为空"), | |||
DEPT_IS_NOT_EXIST(1220302, "部门不存在"), | |||
SECTION_ID_IS_NULL(1220303, "路段id为空"), | |||
SECTION_LIST_IS_NULL(1220304, "路段列表为空"); | |||
SECTION_LIST_IS_NULL(1220304, "路段列表为空"), | |||
DEPT_SECTION_IS_NOT_EXIST(1220305, "部门关联的路段为空"); | |||
/** | |||
* 错误码 |
@@ -79,7 +79,7 @@ public class RoleServiceImpl implements IRoleService { | |||
queryWrapper.eq("mark", 1); | |||
//queryWrapper.orderByAsc("sort"); | |||
queryWrapper.orderByAsc("create_time"); | |||
queryWrapper.ne("code", "super"); | |||
queryWrapper.ne("id", "1"); | |||
// 查询分页数据 | |||
IPage<Role> pageData = roleMapper.selectPage(page, queryWrapper); | |||
pageData.convert(x -> { |
@@ -121,10 +121,13 @@ public class SectionServiceImpl extends BaseServiceImpl<SectionMapper, Section> | |||
List<SectionDept> sectionDeptList = sectionDeptMapper.selectList(Wrappers.<SectionDept>lambdaQuery() | |||
.eq(SectionDept::getTenantId, tenantId) | |||
.in(SectionDept::getDeptId, deptList)); | |||
if(StringUtils.isEmpty(sectionDeptList) && sectionDeptList.size()<=0){ | |||
return JsonResult.error(SectionEnum.DEPT_SECTION_IS_NOT_EXIST.getCode(),SectionEnum.DEPT_SECTION_IS_NOT_EXIST.getMsg()); | |||
} | |||
//查询对应的路段列表 | |||
List<String> sectionIdList = sectionDeptList.stream().map(t -> t.getSectionId()).collect(Collectors.toList()); | |||
if (StringUtils.isEmpty(sectionIdList)) { | |||
JsonResult.error(SectionEnum.SECTION_ID_IS_NULL.getCode(), SectionEnum.SECTION_ID_IS_NULL.getMsg()); | |||
return JsonResult.error(SectionEnum.SECTION_ID_IS_NULL.getCode(), SectionEnum.SECTION_ID_IS_NULL.getMsg()); | |||
} | |||
//根据路段id列表获取对应的路段信息 | |||
List<Section> sectionList = sectionMapper.selectList(new LambdaQueryWrapper<Section>() |
@@ -110,10 +110,13 @@ public class StructureServiceImpl extends BaseServiceImpl<StructureMapper, Struc | |||
List<SectionDept> sectionDeptList = sectionDeptMapper.selectList(Wrappers.<SectionDept>lambdaQuery() | |||
.eq(SectionDept::getTenantId, tenantId) | |||
.in(SectionDept::getDeptId, deptList)); | |||
if(StringUtils.isEmpty(sectionDeptList) && sectionDeptList.size()<=0){ | |||
return JsonResult.error(SectionEnum.DEPT_SECTION_IS_NOT_EXIST.getCode(),SectionEnum.DEPT_SECTION_IS_NOT_EXIST.getMsg()); | |||
} | |||
//查询对应的路段列表 | |||
List<String> sectionIdList = sectionDeptList.stream().map(t -> t.getSectionId()).collect(Collectors.toList()); | |||
if (StringUtils.isEmpty(sectionIdList)) { | |||
JsonResult.error(SectionEnum.SECTION_ID_IS_NULL.getCode(), SectionEnum.SECTION_ID_IS_NULL.getMsg()); | |||
return JsonResult.error(SectionEnum.SECTION_ID_IS_NULL.getCode(), SectionEnum.SECTION_ID_IS_NULL.getMsg()); | |||
} | |||
List<StructureInfoVo> list = new ArrayList<>(); | |||
//根据路段id查询对应的构造物列表 |
@@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||
select <include refid="selectUserVo"/> | |||
from th_oauth_user | |||
<where> | |||
<if test="1 == 1"> and mark = 1 </if> | |||
<if test="1 == 1"> and mark = 1 and role_id != 1 </if> | |||
<if test="request.tenantId != null and request.tenantId != ''"> and tenant_id = #{request.tenantId} </if> | |||
<if test="request.username != null and request.username != ''"> and username like concat('%', #{request.username}, '%') </if> | |||
<if test="request.realname != null and request.realname != ''"> and realname like concat('%', #{request.realname}, '%') </if> |