|
@@ -0,0 +1,101 @@
|
|
|
+<?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">
|
|
|
+<mapper namespace="com.fs.user.mapper.FsUserComplaintMapper">
|
|
|
+
|
|
|
+ <resultMap type="FsUserComplaint" id="FsUserComplaintResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="fsUserId" column="fs_user_id" />
|
|
|
+ <result property="title" column="title" />
|
|
|
+ <result property="content" column="content" />
|
|
|
+ <result property="images" column="images" />
|
|
|
+ <result property="type" column="type" />
|
|
|
+ <result property="linkId" column="link_id" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectFsUserComplaintVo">
|
|
|
+ select id, fs_user_id, title, content, images, type, link_id, create_time, create_by, update_time, update_by, remark from fs_user_complaint
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectFsUserComplaintList" parameterType="FsUserComplaint" resultMap="FsUserComplaintResult">
|
|
|
+ <include refid="selectFsUserComplaintVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="fsUserId != null "> and fs_user_id = #{fsUserId}</if>
|
|
|
+ <if test="title != null and title != ''"> and title = #{title}</if>
|
|
|
+ <if test="content != null and content != ''"> and content = #{content}</if>
|
|
|
+ <if test="images != null and images != ''"> and images = #{images}</if>
|
|
|
+ <if test="type != null "> and type = #{type}</if>
|
|
|
+ <if test="linkId != null "> and link_id = #{linkId}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFsUserComplaintById" parameterType="Long" resultMap="FsUserComplaintResult">
|
|
|
+ <include refid="selectFsUserComplaintVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertFsUserComplaint" parameterType="FsUserComplaint" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into fs_user_complaint
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="fsUserId != null">fs_user_id,</if>
|
|
|
+ <if test="title != null">title,</if>
|
|
|
+ <if test="content != null">content,</if>
|
|
|
+ <if test="images != null">images,</if>
|
|
|
+ <if test="type != null">type,</if>
|
|
|
+ <if test="linkId != null">link_id,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="fsUserId != null">#{fsUserId},</if>
|
|
|
+ <if test="title != null">#{title},</if>
|
|
|
+ <if test="content != null">#{content},</if>
|
|
|
+ <if test="images != null">#{images},</if>
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
+ <if test="linkId != null">#{linkId},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateFsUserComplaint" parameterType="FsUserComplaint">
|
|
|
+ update fs_user_complaint
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="fsUserId != null">fs_user_id = #{fsUserId},</if>
|
|
|
+ <if test="title != null">title = #{title},</if>
|
|
|
+ <if test="content != null">content = #{content},</if>
|
|
|
+ <if test="images != null">images = #{images},</if>
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
+ <if test="linkId != null">link_id = #{linkId},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteFsUserComplaintById" parameterType="Long">
|
|
|
+ delete from fs_user_complaint where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteFsUserComplaintByIds" parameterType="String">
|
|
|
+ delete from fs_user_complaint where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|