新增公司

This commit is contained in:
sxu 2025-01-05 11:02:05 +08:00
parent 8920722356
commit 53f6e98185
2 changed files with 4 additions and 0 deletions

View File

@ -109,6 +109,7 @@ public class SysUserServiceImpl implements ISysUserService {
String phone =user.getPhonenumber().replace("\\", "\\\\").replace("%", "\\%").replace("_", "\\_"); String phone =user.getPhonenumber().replace("\\", "\\\\").replace("%", "\\%").replace("_", "\\_");
user.setPhonenumber(phone); user.setPhonenumber(phone);
} }
user.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
List<SysUser> sysUsers = userMapper.selectUserList(user); List<SysUser> sysUsers = userMapper.selectUserList(user);
return sysUsers; return sysUsers;
} }

View File

@ -130,6 +130,9 @@
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d') AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
</if> </if>
<if test="companyId != null and companyId != 0">
AND (find_in_set(#{companyId}, ancestors) or u.dept_id = #{companyId})
</if>
<if test="deptId != null and deptId != 0"> <if test="deptId != null and deptId != 0">
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
ancestors) )) ancestors) ))