|
@@ -4,27 +4,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.ruoyi.system.mapper.SysUserMapper">
|
|
|
|
|
|
- <resultMap type="SysUser" id="SysUserResult">
|
|
|
- <id property="userId" column="user_id"/>
|
|
|
- <result property="deptId" column="dept_id"/>
|
|
|
- <result property="userName" column="user_name"/>
|
|
|
- <result property="nickName" column="nick_name"/>
|
|
|
- <result property="nickNameEn" column="nick_name_en"/>
|
|
|
- <result property="email" column="email"/>
|
|
|
- <result property="phonenumber" column="phonenumber"/>
|
|
|
- <result property="sex" column="sex"/>
|
|
|
- <result property="avatar" column="avatar"/>
|
|
|
- <result property="password" column="password"/>
|
|
|
- <result property="status" column="status"/>
|
|
|
- <result property="delFlag" column="del_flag"/>
|
|
|
- <result property="loginIp" column="login_ip"/>
|
|
|
- <result property="loginDate" column="login_date"/>
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
- <result property="remark" column="remark" />
|
|
|
- <result property="tenantId" column="tenant_id" />
|
|
|
+ <resultMap type="SysUser" id="SysUserResult">
|
|
|
+ <id property="userId" column="user_id"/>
|
|
|
+ <result property="deptId" column="dept_id"/>
|
|
|
+ <result property="userName" column="user_name"/>
|
|
|
+ <result property="nickName" column="nick_name"/>
|
|
|
+ <result property="nickNameEn" column="nick_name_en"/>
|
|
|
+ <result property="email" column="email"/>
|
|
|
+ <result property="phonenumber" column="phonenumber"/>
|
|
|
+ <result property="sex" column="sex"/>
|
|
|
+ <result property="avatar" column="avatar"/>
|
|
|
+ <result property="password" column="password"/>
|
|
|
+ <result property="status" column="status"/>
|
|
|
+ <result property="delFlag" column="del_flag"/>
|
|
|
+ <result property="loginIp" column="login_ip"/>
|
|
|
+ <result property="loginDate" column="login_date"/>
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
+ <result property="tenantId" column="tenant_id"/>
|
|
|
<result property="jobNumber" column="job_number" />
|
|
|
<result property="userCode" column="user_code"/>
|
|
|
<result property="userType" column="user_type" />
|
|
@@ -282,6 +282,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</foreach>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getDetpIdListByUserId" resultType="java.lang.Long">
|
|
|
+ select distinct srd.dept_id
|
|
|
+ from sys_user_role sur
|
|
|
+ inner join sys_role sr on sur.role_id = sr.role_id
|
|
|
+ inner join sys_role_dept srd on sr.role_id = srd.role_id
|
|
|
+ where sur.user_id = #{userId}
|
|
|
+ </select>
|
|
|
+
|
|
|
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
|
|
insert into sys_user(
|
|
|
<if test="userId != null and userId != 0">user_id,</if>
|