|
|
@@ -1,5 +1,6 @@
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<!--suppress ALL -->
|
|
|
<mapper namespace="org.springblade.system.user.mapper.UserMapper">
|
|
|
|
|
|
<!-- 通用查询映射结果 -->
|
|
|
@@ -27,6 +28,10 @@
|
|
|
<result column="dept_id" property="deptId"/>
|
|
|
<result column="post_id" property="postId"/>
|
|
|
<result column="working_status" property="workingStatus"/>
|
|
|
+ <result column="points_balance" property="pointsBalance"/>
|
|
|
+ <result column="applets_id" property="appletsId"/>
|
|
|
+ <result column="storage_id" property="storageId"/>
|
|
|
+ <result column="storage_name" property="storageName"/>
|
|
|
</resultMap>
|
|
|
<update id="updateByIdPointsBalance" parameterType="org.springblade.system.user.entity.User">
|
|
|
update blade_user
|
|
|
@@ -36,6 +41,42 @@
|
|
|
</if>
|
|
|
where id = #{users.id}
|
|
|
</update>
|
|
|
+ <update id="updateUserById" parameterType="org.springblade.system.user.entity.User">
|
|
|
+ UPDATE blade_user
|
|
|
+ <set>
|
|
|
+ <if test="tenantId != null">tenant_id = #{tenantId},</if>
|
|
|
+ <if test="updateUser != null">update_user = #{updateUser},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="isDeleted != null">is_deleted = #{isDeleted},</if>
|
|
|
+ <if test="code != null and code != ''">code = #{code},</if>
|
|
|
+ <if test="userType != null">user_type = #{userType},</if>
|
|
|
+ <if test="account != null and account != ''">account = #{account},</if>
|
|
|
+ <if test="password != null and password != ''">password = #{password},</if>
|
|
|
+ <if test="name != null and name != ''">name = #{name},</if>
|
|
|
+ <if test="realName != null and realName != ''">real_name = #{realName},</if>
|
|
|
+ <if test="email != null and email != ''">email = #{email},</if>
|
|
|
+ <if test="emailAuthorization != null">email_authorization = #{emailAuthorization},</if>
|
|
|
+ <if test="phone != null and phone != ''">phone = #{phone},</if>
|
|
|
+ <if test="birthday != null">birthday = #{birthday},</if>
|
|
|
+ <if test="sex != null">sex = #{sex},</if>
|
|
|
+ <if test="roleId != null">role_id = #{roleId},</if>
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
+ <if test="postId != null">post_id = #{postId},</if>
|
|
|
+ <if test="workingStatus != null">working_status = #{workingStatus},</if>
|
|
|
+ <if test="pointsBalance != null">points_balance = #{pointsBalance},</if>
|
|
|
+ <if test="appletsId != null">applets_id = #{appletsId},</if>
|
|
|
+ <if test="storageExist == 1">
|
|
|
+ storage_id = null,
|
|
|
+ storage_name = null
|
|
|
+ </if>
|
|
|
+ <if test="storageExist == null or storageExist != 1">
|
|
|
+ <if test="storageId != null">storage_id = #{storageId},</if>
|
|
|
+ <if test="storageName != null and storageName != ''">storage_name = #{storageName},</if>
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ WHERE id = #{id}
|
|
|
+ </update>
|
|
|
|
|
|
<select id="selectUserPage" resultMap="userResultMap">
|
|
|
select * from blade_user where is_deleted = 0
|