|
@@ -0,0 +1,81 @@
|
|
|
+<?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.FsUserComplaintMsgMapper">
|
|
|
+
|
|
|
+ <resultMap type="FsUserComplaintMsg" id="FsUserComplaintMsgResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="complaintId" column="complaint_id" />
|
|
|
+ <result property="sendType" column="send_type" />
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
+ <result property="content" column="content" />
|
|
|
+ <result property="images" column="images" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectFsUserComplaintMsgVo">
|
|
|
+ select id, complaint_id, send_type, user_id, content, images, create_time from fs_user_complaint_msg
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectFsUserComplaintMsgList" parameterType="FsUserComplaintMsg" resultMap="FsUserComplaintMsgResult">
|
|
|
+ <include refid="selectFsUserComplaintMsgVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="complaintId != null "> and complaint_id = #{complaintId}</if>
|
|
|
+ <if test="sendType != null "> and send_type = #{sendType}</if>
|
|
|
+ <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
+ <if test="content != null and content != ''"> and content = #{content}</if>
|
|
|
+ <if test="images != null and images != ''"> and images = #{images}</if>
|
|
|
+ </where>
|
|
|
+ order by create_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFsUserComplaintMsgById" parameterType="Long" resultMap="FsUserComplaintMsgResult">
|
|
|
+ <include refid="selectFsUserComplaintMsgVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertFsUserComplaintMsg" parameterType="FsUserComplaintMsg" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into fs_user_complaint_msg
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="complaintId != null">complaint_id,</if>
|
|
|
+ <if test="sendType != null">send_type,</if>
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
+ <if test="content != null">content,</if>
|
|
|
+ <if test="images != null">images,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="complaintId != null">#{complaintId},</if>
|
|
|
+ <if test="sendType != null">#{sendType},</if>
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
+ <if test="content != null">#{content},</if>
|
|
|
+ <if test="images != null">#{images},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateFsUserComplaintMsg" parameterType="FsUserComplaintMsg">
|
|
|
+ update fs_user_complaint_msg
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="complaintId != null">complaint_id = #{complaintId},</if>
|
|
|
+ <if test="sendType != null">send_type = #{sendType},</if>
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
+ <if test="content != null">content = #{content},</if>
|
|
|
+ <if test="images != null">images = #{images},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteFsUserComplaintMsgById" parameterType="Long">
|
|
|
+ delete from fs_user_complaint_msg where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteFsUserComplaintMsgByIds" parameterType="String">
|
|
|
+ delete from fs_user_complaint_msg where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|