feat:用户接口开发v1
This commit is contained in:
@@ -160,6 +160,12 @@
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
<update id="deleteBatch">
|
||||
update x_user set del_flag = 0, update_time = #{time}, update_by = #{operator} where id in
|
||||
<foreach collection="ids" item="id" open="(" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectByUsername" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"/>
|
||||
@@ -167,4 +173,54 @@
|
||||
where username = #{username} and del_flag = 0 and status = 1
|
||||
</select>
|
||||
|
||||
<select id="getUserList" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from x_user
|
||||
<trim prefix="AND">
|
||||
<where>
|
||||
<if test="name != null and name != ''">
|
||||
AND name LIKE CONCAT('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="username != null and username != ''">
|
||||
AND username = #{username}
|
||||
</if>
|
||||
<if test="email != null and email != ''">
|
||||
AND email = #{email}
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
AND phone = #{phone}
|
||||
</if>
|
||||
<if test="status != null">
|
||||
AND status = #{status}
|
||||
</if>
|
||||
<if test="delFlag != null">
|
||||
AND del_flag = #{delFlag}
|
||||
</if>
|
||||
<if test="loginIp != null and loginIp != ''">
|
||||
AND login_ip = #{loginIp}
|
||||
</if>
|
||||
<if test="loginDate != null">
|
||||
AND login_date = #{loginDate}
|
||||
</if>
|
||||
<if test="createBy != null and createBy != ''">
|
||||
AND create_by = #{createBy}
|
||||
</if>
|
||||
<if test="updateBy != null and updateBy != ''">
|
||||
AND update_by = #{updateBy}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
AND create_time >= #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
AND update_time <= #{updateTime}
|
||||
</if>
|
||||
</where>
|
||||
</trim>
|
||||
</select>
|
||||
<select id="getUserById" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from x_user
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user