From 0dff85a422669f41ef6d8e88fa24bf26ca164cbd Mon Sep 17 00:00:00 2001 From: jinlin <jinlin> Date: 星期二, 12 十二月 2023 10:38:03 +0800 Subject: [PATCH] 修改 --- zt/core/src/main/resources/mapper/sys/SysUserDao.xml | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-) diff --git a/zt/core/src/main/resources/mapper/sys/SysUserDao.xml b/zt/core/src/main/resources/mapper/sys/SysUserDao.xml index 72e3dbe..bb785cf 100644 --- a/zt/core/src/main/resources/mapper/sys/SysUserDao.xml +++ b/zt/core/src/main/resources/mapper/sys/SysUserDao.xml @@ -5,7 +5,7 @@ <select id="getList" resultType="com.zt.core.sys.model.SysUser"> select a.* - ,(select t2.dept_name from SYS_DEPT t2 where t2.dept_id = a.dept_id) deptName + ,(select t2.name from SYS_DEPT t2 where t2.id = a.dept_id) deptName from SYS_USER a where a.is_delete = 0 <if test="username != null and username.trim() != ''"> @@ -36,7 +36,7 @@ , a.username , a.real_name , a.MOBILE - , (select t2.dept_name from SYS_DEPT t2 where t2.dept_id = a.dept_id) deptName + , (select t2.name from SYS_DEPT t2 where t2.id = a.dept_id) deptName from SYS_USER a where a.del_flag = 0 and a.id = #{value} @@ -51,7 +51,7 @@ , a.username , a.real_name , a.MOBILE - , (select t2.dept_name from SYS_DEPT t2 where t2.dept_id = a.dept_id) deptName + , (select t2.name from SYS_DEPT t2 where t2.id = a.dept_id) deptName , a.password from SYS_USER a where a.is_delete = 0 @@ -92,7 +92,7 @@ and dept_id = #{unitid} </if> <if test="code != null and code != ''"> - or dept_id in (select dept_id from SYS_DEPT where dept_code=#{code})) + or dept_id in (select id from SYS_DEPT where code=#{code})) </if> <if test="password != null and password != ''"> and password = #{password} @@ -107,7 +107,7 @@ , a.username , a.real_name , a.MOBILE - , (select t2.dept_name from SYS_DEPT t2 where t2.dept_id = a.dept_id) deptName + , (select t2.name from SYS_DEPT t2 where t2.id = a.dept_id) deptName from SYS_USER a where a.is_delete = 0 # and a.code = #{code} @@ -117,7 +117,7 @@ SELECT a.real_Name, c.name as roleName, - (select dept_name from SYS_DEPT d where a.DEPT_ID = d.DEPT_ID AND d.del_flag=0 limit 1 ) as deptName + (select name from SYS_DEPT d where a.DEPT_ID = d.ID AND d.is_delete=0 limit 1 ) as deptName FROM SYS_USER a, SYS_ROLE_USER b, @@ -240,7 +240,9 @@ <select id="getUsersList" resultType="com.zt.core.sys.model.SysUser"> select real_name as name,id as id from sys_user </select> - + <select id="getUsersName" resultType="java.lang.String"> + select real_name from sys_user WHERE id=#{id} + </select> <update id="updatePassword"> update SYS_USER -- Gitblit v1.9.1