src/main/java/com/ruoyi/project/system/service/impl/SysUserServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/system/SysUserMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/ruoyi/project/system/service/impl/SysUserServiceImpl.java
@@ -12,6 +12,7 @@ import com.ruoyi.project.system.mapper.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -554,6 +555,9 @@ */ @Override public List<SysUser> userListNoPage(SysUser user) { //获取登录用户信息 SysUser loginUser = SecurityUtils.getLoginUser().getUser(); user.setTenantId(loginUser.getTenantId()); return userMapper.selectUserList(user); } src/main/resources/mapper/system/SysUserMapper.xml
@@ -64,7 +64,7 @@ LEFT JOIN sys_dept T2 ON T1.dept_id = T2.dept_id GROUP BY T1.user_id ) T2 on T2.user_id = u.user_id where u.del_flag = '0' where u.del_flag = '0' and u.tenant_id = #{tenantId} <if test="userId != null and userId != 0"> AND u.user_id = #{userId} </if>