| | |
| | | select a.id |
| | | , a.dept_id |
| | | , a.company_id |
| | | , '1271368584383188993' as TENANT_ID |
| | | , '1271368584383188993' as TENANT_ID |
| | | , a.username |
| | | , a.real_name |
| | | , a.mobile |
| | |
| | | select a.id |
| | | , a.dept_id |
| | | , a.company_id |
| | | , '1271368584383188993' as TENANT_ID |
| | | , '1271368584383188993' as TENANT_ID |
| | | , a.username |
| | | , a.real_name |
| | | , a.mobile |
| | |
| | | and a.id = #{userId} |
| | | and b.user_id = a.id |
| | | and c.id = b.role_id |
| | | and ((#{localServer} = 'jd' and c.code in ('cjbm','ztsxlbm')) |
| | | or (#{localServer} = 'cj' |
| | | and c.code in ('zlbm','tybm','ywzbm','tzbm','czbm','bzbm','dbsbm') |
| | | ) |
| | | and ((#{localServer} = 'jd' and c.code in ('cjbm', 'ztsxlbm')) |
| | | or (#{localServer} = 'cj' |
| | | and c.code in ('zlbm', 'tybm', 'ywzbm', 'tzbm', 'czbm', 'bzbm', 'dbsbm') |
| | | ) |
| | | ) |
| | | </select> |
| | | <select id="isGetByUsernameList" resultType="com.zt.core.sys.model.SysUser"> |
| | |
| | | select a.id |
| | | , a.dept_id |
| | | , a.company_id |
| | | , '1271368584383188993' as TENANT_ID |
| | | , '1271368584383188993' as TENANT_ID |
| | | , a.username |
| | | , a.real_name |
| | | , a.mobile |
| | |
| | | WHERE b.is_delete = 0 |
| | | AND b.user_id = #{userId} |
| | | and a.is_delete = 0 |
| | | and a.id =b.role_id |
| | | and a.id = b.role_id |
| | | </select> |
| | | |
| | | <update id="updateLogin"> |
| | |
| | | from sys_user |
| | | where dept_id = #{newShipTeam} |
| | | and id in (select user_id |
| | | from sys_role_user a, |
| | | sys_role b |
| | | where a.role_id = b.id |
| | | and b.code = 'tybm') |
| | | from sys_role_user a, |
| | | sys_role b |
| | | where a.role_id = b.id |
| | | and b.code = 'tybm') |
| | | </select> |
| | | <select id="checkTestHome" resultType="java.lang.Integer"> |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | sys_user |
| | | WHERE |
| | | is_delete = 0 |
| | | SELECT count(1) |
| | | FROM sys_user |
| | | WHERE is_delete = 0 |
| | | AND id = #{userId} |
| | | AND ( |
| | | user_name IN ( 'admin', 'yszl' ) |
| | | user_name IN ('admin', 'yszl') |
| | | OR id IN ( |
| | | SELECT |
| | | user_id |
| | | FROM |
| | | sys_role_user b, |
| | | sys_role c |
| | | WHERE |
| | | b.is_delete = 0 |
| | | SELECT user_id |
| | | FROM sys_role_user b, |
| | | sys_role c |
| | | WHERE b.is_delete = 0 |
| | | AND c.is_delete = 0 |
| | | AND c.id = b.role_id |
| | | AND c.`code` IN ( 'xtglybm', 'ztsxlbm', 'dbsbm', 'zlbm', 'bzbm', 'czbm' ) |
| | | AND c.`code` IN ('xtglybm', 'ztsxlbm', 'dbsbm', 'zlbm', 'bzbm', 'czbm') |
| | | ) |
| | | ) |
| | | </select> |
| | |
| | | <if test="type == null or type == ''"> |
| | | and id not in ( |
| | | select user_id from sys_role_user where role_id |
| | | in (select id from sys_role where code in ('xtglybm','xtbmybm','xtsjybm','rx'))) |
| | | in (select id from sys_role where code in ('xtglybm','xtbmybm','xtsjybm','rx')and is_delete=0)and |
| | | is_delete=0)and is_delete=0 |
| | | </if> |
| | | <if test="deptId != null and deptId != ''"> |
| | | and dept_id = #{deptId} |
| | |
| | | <if test="type == 'zrr'"> |
| | | and id in ( |
| | | select user_id from sys_role_user where role_id |
| | | in (select id from sys_role where code in ('jcry'))) |
| | | in (select id from sys_role where code in ('jcry')and is_delete=0)and is_delete=0)and is_delete=0 |
| | | </if> |
| | | <if test="type == 'csry'"> |
| | | and id in ( |
| | | select user_id from sys_role_user where role_id |
| | | in (select id from sys_role where code in ('jcry'))) |
| | | in (select id from sys_role where code in ('jcry')and is_delete=0)and is_delete=0)and is_delete=0 |
| | | </if> |
| | | <if test="type == 'shry'"> |
| | | and id in ( |
| | | select user_id from sys_role_user where role_id |
| | | in (select id from sys_role where code in ('jcry','zljdy','shry'))) |
| | | in (select id from sys_role where code in ('jcry','zljdy','shry')and is_delete=0)and is_delete=0) and |
| | | is_delete=0 |
| | | </if> |
| | | <if test="type == 'pzry'"> |
| | | and id in ( |
| | | select user_id from sys_role_user where role_id |
| | | in (select id from sys_role where code in ('jcry','shry'))) |
| | | in (select id from sys_role where code in ('jcry','shry')and is_delete=0)and is_delete=0)and is_delete=0 |
| | | </if> |
| | | </select> |
| | | <select id="getUsersName" resultType="java.lang.String"> |
| | | select real_name from sys_user WHERE id=${id} |
| | | select real_name |
| | | from sys_user |
| | | WHERE id = ${id} |
| | | </select> |
| | | <update id="updatePassword"> |
| | | update |
| | | sys_user |
| | | sys_user |
| | | set password = #{password} |
| | | WHERE id=#{id} |
| | | WHERE id = #{id} |
| | | </update> |
| | | </mapper> |