用户管理等
This commit is contained in:
@@ -124,7 +124,6 @@
|
||||
AND wechat_id = #{filter.wechatID}
|
||||
</if>
|
||||
</where>
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<!-- 查询用户列表 -->
|
||||
@@ -150,67 +149,50 @@
|
||||
</update>
|
||||
|
||||
<!-- 插入用户 -->
|
||||
<insert id="insert" parameterType="org.xyzh.common.dto.user.TbSysUser">
|
||||
<insert id="insertUser" parameterType="org.xyzh.common.dto.user.TbSysUser">
|
||||
INSERT INTO tb_sys_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="username != null">username,</if>
|
||||
<if test="password != null">password,</if>
|
||||
<if test="email != null">email,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="avatar != null">avatar,</if>
|
||||
<if test="nickname != null">nickname,</if>
|
||||
<if test="gender != null">gender,</if>
|
||||
<if test="birthday != null">birthday,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="lastLoginTime != null">last_login_time,</if>
|
||||
<if test="lastLoginIp != null">last_login_ip,</if>
|
||||
<if test="creator != null">creator,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="user.id != null">id,</if>
|
||||
<if test="user.username != null">username,</if>
|
||||
<if test="user.password != null">password,</if>
|
||||
<if test="user.email != null">email,</if>
|
||||
<if test="user.phone != null">phone,</if>
|
||||
<if test="user.wechatID != null">wechat_id,</if>
|
||||
<if test="user.status != null">status,</if>
|
||||
<if test="user.createTime != null">create_time,</if>
|
||||
deleted
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="username != null">#{username},</if>
|
||||
<if test="password != null">#{password},</if>
|
||||
<if test="email != null">#{email},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="avatar != null">#{avatar},</if>
|
||||
<if test="nickname != null">#{nickname},</if>
|
||||
<if test="gender != null">#{gender},</if>
|
||||
<if test="birthday != null">#{birthday},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="lastLoginTime != null">#{lastLoginTime},</if>
|
||||
<if test="lastLoginIp != null">#{lastLoginIp},</if>
|
||||
<if test="creator != null">#{creator},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="user.id != null">#{user.id},</if>
|
||||
<if test="user.username != null">#{user.username},</if>
|
||||
<if test="user.password != null">#{user.password},</if>
|
||||
<if test="user.email != null">#{user.email},</if>
|
||||
<if test="user.phone != null">#{user.phone},</if>
|
||||
<if test="user.wechatID != null">#{user.wechatID},</if>
|
||||
<if test="user.status != null">#{user.status},</if>
|
||||
<if test="user.createTime != null">#{user.createTime},</if>
|
||||
0
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- 更新用户 -->
|
||||
<update id="updateById" parameterType="org.xyzh.common.dto.user.TbSysUser">
|
||||
<update id="updateUser" parameterType="org.xyzh.common.dto.user.TbSysUser">
|
||||
UPDATE tb_sys_user
|
||||
<set>
|
||||
<if test="username != null">username = #{username},</if>
|
||||
<if test="password != null">password = #{password},</if>
|
||||
<if test="email != null">email = #{email},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="avatar != null">avatar = #{avatar},</if>
|
||||
<if test="nickname != null">nickname = #{nickname},</if>
|
||||
<if test="gender != null">gender = #{gender},</if>
|
||||
<if test="birthday != null">birthday = #{birthday},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="lastLoginTime != null">last_login_time = #{lastLoginTime},</if>
|
||||
<if test="lastLoginIp != null">last_login_ip = #{lastLoginIp},</if>
|
||||
<if test="updater != null">updater = #{updater},</if>
|
||||
<if test="user.username != null">username = #{user.username},</if>
|
||||
<if test="user.password != null">password = #{user.password},</if>
|
||||
<if test="user.email != null">email = #{user.email},</if>
|
||||
<if test="user.phone != null">phone = #{user.phone},</if>
|
||||
<if test="user.wechatID != null">wechat_id = #{user.wechatID},</if>
|
||||
<if test="user.status != null">status = #{user.status},</if>
|
||||
update_time = NOW()
|
||||
</set>
|
||||
WHERE id = #{id} AND deleted = 0
|
||||
WHERE id = #{user.id} AND deleted = 0
|
||||
</update>
|
||||
|
||||
<!-- 根据ID删除(逻辑删除) -->
|
||||
<update id="deleteById">
|
||||
<update id="deleteUser">
|
||||
UPDATE tb_sys_user
|
||||
SET deleted = 1,
|
||||
delete_time = NOW()
|
||||
|
||||
Reference in New Issue
Block a user