|
|
@@ -0,0 +1,133 @@
|
|
|
+<?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.course.mapper.FsCourseComplaintChannelMapper">
|
|
|
+
|
|
|
+ <resultMap type="FsCourseComplaintChannel" id="FsCourseComplaintChannelResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="contact" column="contact" />
|
|
|
+ <result property="contactType" column="contact_type" />
|
|
|
+ <result property="title" column="title" />
|
|
|
+ <result property="content" column="content" />
|
|
|
+ <result property="fsUserId" column="fs_user_id" />
|
|
|
+ <result property="proofImages" column="proof_images" />
|
|
|
+ <result property="platformReplyStatus" column="platform_reply_status"/>
|
|
|
+ <result property="userReplyStatus" column="user_reply_status" />
|
|
|
+ <result property="isCompleted" column="is_completed" />
|
|
|
+ <result property="remarks" column="remarks" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectFsCourseComplaintChannelVo">
|
|
|
+ select id, contact, contact_type, title, content, fs_user_id, proof_images,
|
|
|
+ platform_reply_status, user_reply_status, is_completed, remarks,
|
|
|
+ create_by, create_time, update_by, update_time
|
|
|
+ from course_complaint_channel
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectFsCourseComplaintChannelList" parameterType="FsCourseComplaintChannel" resultMap="FsCourseComplaintChannelResult">
|
|
|
+ <include refid="selectFsCourseComplaintChannelVo"/>
|
|
|
+ <where>
|
|
|
+ and del_flag = 0
|
|
|
+ <if test="contact != null and contact != ''">
|
|
|
+ and contact like concat('%', #{contact}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="contactType != null and contactType != ''">
|
|
|
+ and contact_type = #{contactType}
|
|
|
+ </if>
|
|
|
+ <if test="title != null and title != ''">
|
|
|
+ and title like concat('%', #{title}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="fsUserId != null and fsUserId != ''">
|
|
|
+ and fs_user_id = #{fsUserId}
|
|
|
+ </if>
|
|
|
+ <if test="platformReplyStatus != null">
|
|
|
+ and platform_reply_status = #{platformReplyStatus}
|
|
|
+ </if>
|
|
|
+ <if test="userReplyStatus != null">
|
|
|
+ and user_reply_status = #{userReplyStatus}
|
|
|
+ </if>
|
|
|
+ <if test="isCompleted != null">
|
|
|
+ and is_completed = #{isCompleted}
|
|
|
+ </if>
|
|
|
+ <if test="startCreateTime != null and endCreateTime != null">
|
|
|
+ AND (DATE_FORMAT(create_time, "%Y-%m-%d") >= DATE_FORMAT(#{startCreateTime}, "%Y-%m-%d")
|
|
|
+ and DATE_FORMAT(create_time, "%Y-%m-%d") <= DATE_FORMAT(#{endCreateTime}, "%Y-%m-%d"))
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by create_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFsCourseComplaintChannelById" parameterType="Long" resultMap="FsCourseComplaintChannelResult">
|
|
|
+ <include refid="selectFsCourseComplaintChannelVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertFsCourseComplaintChannel" parameterType="FsCourseComplaintChannel" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into course_complaint_channel
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="contact != null">contact,</if>
|
|
|
+ <if test="contactType != null">contact_type,</if>
|
|
|
+ <if test="title != null">title,</if>
|
|
|
+ <if test="content != null">content,</if>
|
|
|
+ <if test="fsUserId != null">fs_user_id,</if>
|
|
|
+ <if test="proofImages != null">proof_images,</if>
|
|
|
+ <if test="platformReplyStatus != null">platform_reply_status,</if>
|
|
|
+ <if test="userReplyStatus != null">user_reply_status,</if>
|
|
|
+ <if test="isCompleted != null">is_completed,</if>
|
|
|
+ <if test="remarks != null">remarks,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="contact != null">#{contact},</if>
|
|
|
+ <if test="contactType != null">#{contactType},</if>
|
|
|
+ <if test="title != null">#{title},</if>
|
|
|
+ <if test="content != null">#{content},</if>
|
|
|
+ <if test="fsUserId != null">#{fsUserId},</if>
|
|
|
+ <if test="proofImages != null">#{proofImages},</if>
|
|
|
+ <if test="platformReplyStatus != null">#{platformReplyStatus},</if>
|
|
|
+ <if test="userReplyStatus != null">#{userReplyStatus},</if>
|
|
|
+ <if test="isCompleted != null">#{isCompleted},</if>
|
|
|
+ <if test="remarks != null">#{remarks},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateFsCourseComplaintChannel" parameterType="FsCourseComplaintChannel">
|
|
|
+ update course_complaint_channel
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="contact != null">contact = #{contact},</if>
|
|
|
+ <if test="contactType != null">contact_type = #{contactType},</if>
|
|
|
+ <if test="title != null">title = #{title},</if>
|
|
|
+ <if test="content != null">content = #{content},</if>
|
|
|
+ <if test="fsUserId != null">fs_user_id = #{fsUserId},</if>
|
|
|
+ <if test="proofImages != null">proof_images = #{proofImages},</if>
|
|
|
+ <if test="platformReplyStatus != null">platform_reply_status = #{platformReplyStatus},</if>
|
|
|
+ <if test="userReplyStatus != null">user_reply_status = #{userReplyStatus},</if>
|
|
|
+ <if test="isCompleted != null">is_completed = #{isCompleted},</if>
|
|
|
+ <if test="remarks != null">remarks = #{remarks},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteFsCourseComplaintChannelById" parameterType="Long">
|
|
|
+ update course_complaint_channel set del_flag = 2 where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteFsCourseComplaintChannelByIds" parameterType="Long">
|
|
|
+ update course_complaint_channel set del_flag = 2 where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|