|
@@ -9,6 +9,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="roleId" column="role_id" />
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap type="com.boman.domain.SysUser" id="SysUserResult">
|
|
|
+ <id property="id" column="id" />
|
|
|
+ <result property="deptId" column="dept_id" />
|
|
|
+ <result property="userName" column="user_name" />
|
|
|
+ <result property="nickName" column="nick_name" />
|
|
|
+ <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" />
|
|
|
+ </resultMap>
|
|
|
<delete id="deleteUserRoleByUserId" parameterType="Long">
|
|
|
delete from sys_user_role where user_id=#{userId}
|
|
|
</delete>
|
|
@@ -41,4 +61,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
#{userId}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
+
|
|
|
+ <select id="selectUserByRoleId" resultMap="SysUserResult">
|
|
|
+ select u.id, u.user_name from sys_user_role r left join sys_user u on r.user_id = u.id where r.role_id=#{roleId}
|
|
|
+ </select>
|
|
|
</mapper>
|