| | |
| | | <mapper namespace="com.zt.modules.sys.dao.SysUserDao"> |
| | | |
| | | <select id="getList" resultType="com.zt.core.sys.model.SysUser"> |
| | | select a.user_id as id |
| | | ,a.dept_id |
| | | ,a.dept_id as company_id |
| | | ,a.user_name as username |
| | | ,a.nick_name as real_name |
| | | ,a.phonenumber as MOBILE |
| | | select a.* |
| | | ,(select t2.dept_name from SYS_DEPT t2 where t2.dept_id = a.dept_id) deptName |
| | | from SYS_USER a |
| | | where a.del_flag = 0 |
| | | where a.is_delete = 0 |
| | | <if test="username != null and username.trim() != ''"> |
| | | and (a.user_name like #{username} or a.nick_name like #{username}) |
| | | and (a.username like #{username} or a.nick_name like #{username}) |
| | | </if> |
| | | <if test="deptId != null and deptId != 0"> |
| | | and a.dept_id = #{deptId} |
| | |
| | | </select> |
| | | |
| | | <select id="getByUsername" resultType="com.zt.core.sys.model.SysUser"> |
| | | select a.user_id as id |
| | | select a.id |
| | | , a.dept_id |
| | | , a.dept_id as company_id |
| | | , '1271368584383188993' as TENANT_ID |
| | | , a.user_name as username |
| | | , a.nick_name as real_name |
| | | , a.phonenumber as MOBILE |
| | | , a.company_id |
| | | , '1271368584383188993' as TENANT_ID |
| | | , a.username |
| | | , a.real_name |
| | | , a.MOBILE |
| | | , (select t2.dept_name from SYS_DEPT t2 where t2.dept_id = a.dept_id) deptName |
| | | , a.password as password |
| | | , a.password |
| | | from SYS_USER a |
| | | where a.del_flag = 0 |
| | | and user_name = #{value} |
| | | where a.is_delete = 0 |
| | | and username = #{value} |
| | | limit 1 |
| | | </select> |
| | | <select id="checkUserArea" resultType="com.zt.core.sys.model.SysUser"> |
| | |
| | | |
| | | <select id="userRoleInfo" resultType="com.zt.core.context.User"> |
| | | SELECT |
| | | a.nick_name as realName, |
| | | 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 |
| | | FROM |
| | |
| | | sys_MENU f |
| | | WHERE 1=1 |
| | | <if test="userId != null and userId != ''"> |
| | | and a.user_id = #{userId} |
| | | and a.id = #{userId} |
| | | </if> |
| | | <if test="username != null and username != ''"> |
| | | and a.user_name = #{username} |
| | | and a.username = #{username} |
| | | </if> |
| | | and a.USER_ID = b.USER_ID |
| | | and a.ID = b.USER_ID |
| | | AND b.ROLE_ID = c.id |
| | | and c.id = e.role_id |
| | | and e.menu_id = f.id |
| | |
| | | </foreach> |
| | | </select> |
| | | <select id="getEntity" resultType="com.zt.core.sys.model.SysUser"> |
| | | SELECT b.user_id as id |
| | | SELECT b.id |
| | | , b.dept_id |
| | | , b.dept_id as company_id |
| | | , b.company_id |
| | | , '1271368584383188993' as TENANT_ID |
| | | , b.user_name as username |
| | | , b.nick_name as real_name |
| | | , b.phonenumber as MOBILE |
| | | , b.username |
| | | , b.real_name |
| | | , b.MOBILE |
| | | FROM SYS_USER b |
| | | WHERE b.del_flag = 0 |
| | | and user_id = #{id} |
| | | WHERE b.is_delete = 0 |
| | | and b.id = #{id} |
| | | limit 1 |
| | | </select> |
| | | <select id="getNewConnectUser" resultType="com.zt.core.sys.model.SysUser"> |