This commit is contained in:
sxu 2025-02-17 17:58:26 +08:00
parent eef3407dc1
commit 717ccbe18f
3 changed files with 5 additions and 0 deletions

View File

@ -128,6 +128,7 @@ public class SysDept extends BaseEntity {
/**
* 所属公司ID
*/
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long companyId;
private Long userCount;

View File

@ -88,6 +88,7 @@ public class SysDeptServiceImpl implements ISysDeptService
dept.setDeptName(str);
}
dept.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
//dept.setAreaId(SecurityUtils.getLoginUser().getSysUser().getAreaId());
return deptMapper.selectDeptList(dept);
}

View File

@ -80,6 +80,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="companyId != null and companyId != 0">
AND (find_in_set(#{companyId}, ancestors) or dept_id = #{companyId})
</if>
<!-- <if test="areaId != null and areaId != 0">-->
<!-- AND (find_in_set(#{areaId}, ancestors) or dept_id = #{areaId})-->
<!-- </if>-->
<if test="deptId != null and deptId != 0">
AND dept_id = #{deptId}
</if>