权限
This commit is contained in:
@@ -78,16 +78,6 @@
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 根据用户ID查询用户信息 -->
|
||||
<select id="selectUserInfoById" resultMap="UserInfoResultMap">
|
||||
SELECT
|
||||
<include refid="UserInfo_Column_List"/>
|
||||
FROM tb_sys_user_info
|
||||
WHERE deleted = 0
|
||||
AND user_id = #{userId}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 根据邮箱查询用户 -->
|
||||
<select id="selectByEmail" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
@@ -227,4 +217,33 @@
|
||||
WHERE id = #{id} AND deleted = 0
|
||||
</update>
|
||||
|
||||
<!-- 用户信息相关 -->
|
||||
|
||||
<!-- 根据用户ID查询用户信息 -->
|
||||
<select id="selectUserInfoById" resultMap="UserInfoResultMap">
|
||||
SELECT
|
||||
<include refid="UserInfo_Column_List"/>
|
||||
FROM tb_sys_user_info
|
||||
WHERE deleted = 0
|
||||
AND user_id = #{userId}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 更新用户信息 -->
|
||||
|
||||
<update id="updateUserInfo">
|
||||
UPDATE tb_sys_user_info
|
||||
<set>
|
||||
<if test="userInfo.avatar != null">avatar = #{userInfo.avatar},</if>
|
||||
<if test="userInfo.gender != null">gender = #{userInfo.gender},</if>
|
||||
<if test="userInfo.familyName != null">family_name = #{userInfo.familyName},</if>
|
||||
<if test="userInfo.givenName != null">given_name = #{userInfo.givenName},</if>
|
||||
<if test="userInfo.fullName != null">full_name = #{userInfo.fullName},</if>
|
||||
<if test="userInfo.idCard != null">id_card = #{userInfo.idCard},</if>
|
||||
<if test="userInfo.address != null">address = #{userInfo.address},</if>
|
||||
<if test="userInfo.updateTime != null">update_time = #{userInfo.updateTime}</if>
|
||||
<if test="userInfo.updateTime == null">update_time = NOW() </if>
|
||||
</set>
|
||||
WHERE user_id = #{userInfo.userID} AND deleted = 0
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user