130 lines
6.2 KiB
XML
130 lines
6.2 KiB
XML
<?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.intc.system.mapper.SysFeedbackMapper">
|
|
|
|
<resultMap type="SysFeedbackVo" id="SysFeedbackResult">
|
|
<result property="id" column="id" />
|
|
<result property="feedbackType" column="feedback_type" />
|
|
<result property="content" column="content" />
|
|
<result property="contact" column="contact" />
|
|
<result property="images" column="images" />
|
|
<result property="source" column="source" />
|
|
<result property="status" column="status" />
|
|
<result property="replyContent" column="reply_content" />
|
|
<result property="replyBy" column="reply_by" />
|
|
<result property="replyTime" column="reply_time" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createName" column="create_name" />
|
|
<result property="createDeptId" column="create_dept_id" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="remark" column="remark" />
|
|
</resultMap>
|
|
|
|
<sql id="selectSysFeedbackVo">
|
|
select id, feedback_type, content, contact, images, source, status, reply_content, reply_by, reply_time,
|
|
del_flag, create_by, create_name, create_dept_id, create_time, update_by, update_time, remark
|
|
from sys_feedback
|
|
where del_flag = '0'
|
|
</sql>
|
|
|
|
<select id="selectSysFeedbackById" parameterType="Long" resultMap="SysFeedbackResult">
|
|
<include refid="selectSysFeedbackVo"/>
|
|
and id = #{id}
|
|
</select>
|
|
|
|
<select id="selectSysFeedbackList" parameterType="SysFeedbackDto" resultMap="SysFeedbackResult">
|
|
<include refid="selectSysFeedbackVo"/>
|
|
<if test="feedbackType != null and feedbackType != ''">
|
|
AND feedback_type = #{feedbackType}
|
|
</if>
|
|
<if test="status != null and status != ''">
|
|
AND status = #{status}
|
|
</if>
|
|
<if test="source != null and source != ''">
|
|
AND source = #{source}
|
|
</if>
|
|
<if test="createBy != null and createBy != ''">
|
|
AND create_by = #{createBy}
|
|
</if>
|
|
order by create_time desc
|
|
</select>
|
|
|
|
<insert id="insertSysFeedback" parameterType="SysFeedback">
|
|
insert into sys_feedback
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
id,
|
|
<if test="feedbackType != null">feedback_type,</if>
|
|
<if test="content != null and content != ''">content,</if>
|
|
<if test="contact != null">contact,</if>
|
|
<if test="images != null">images,</if>
|
|
<if test="source != null">source,</if>
|
|
<if test="status != null and status != ''">status,</if>
|
|
<if test="replyContent != null">reply_content,</if>
|
|
<if test="replyBy != null">reply_by,</if>
|
|
<if test="replyTime != null">reply_time,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createName != null">create_name,</if>
|
|
<if test="createDeptId != null">create_dept_id,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateBy != null">update_by,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="remark != null">remark,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
#{id},
|
|
<if test="feedbackType != null">#{feedbackType},</if>
|
|
<if test="content != null and content != ''">#{content},</if>
|
|
<if test="contact != null">#{contact},</if>
|
|
<if test="images != null">#{images},</if>
|
|
<if test="source != null">#{source},</if>
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
<if test="replyContent != null">#{replyContent},</if>
|
|
<if test="replyBy != null">#{replyBy},</if>
|
|
<if test="replyTime != null">#{replyTime},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createName != null">#{createName},</if>
|
|
<if test="createDeptId != null">#{createDeptId},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="remark != null">#{remark},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateSysFeedback" parameterType="SysFeedback">
|
|
update sys_feedback
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="feedbackType != null">feedback_type = #{feedbackType},</if>
|
|
<if test="content != null and content != ''">content = #{content},</if>
|
|
<if test="contact != null">contact = #{contact},</if>
|
|
<if test="images != null">images = #{images},</if>
|
|
<if test="source != null">source = #{source},</if>
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
<if test="replyContent != null">reply_content = #{replyContent},</if>
|
|
<if test="replyBy != null">reply_by = #{replyBy},</if>
|
|
<if test="replyTime != null">reply_time = #{replyTime},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<update id="deleteSysFeedbackById" parameterType="Long">
|
|
update sys_feedback set del_flag = '1' where id = #{id}
|
|
</update>
|
|
|
|
<update id="deleteSysFeedbackByIds" parameterType="Long">
|
|
update sys_feedback set del_flag = '1' where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</update>
|
|
|
|
</mapper>
|