|
@@ -0,0 +1,89 @@
|
|
|
+<?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.ruoyi.project.training.spec.mapper.TStFeedbackMapper">
|
|
|
+
|
|
|
+ <resultMap type="TStFeedback" id="TStFeedbackResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="successorComment" column="successor_comment" />
|
|
|
+ <result property="updaterCode" column="updater_code" />
|
|
|
+ <result property="updatedate" column="updatedate" />
|
|
|
+ <result property="createrCode" column="creater_code" />
|
|
|
+ <result property="createdate" column="createdate" />
|
|
|
+ <result property="feecbackType" column="feecback_type" />
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTStFeedbackVo">
|
|
|
+ select d.id, d.successor_comment, d.updater_code, d.updatedate, d.creater_code, d.createdate, d.feecback_type ,s.dept_name from t_st_feedback d
|
|
|
+ left join sys_dept s on s.dept_id = d.dept_id
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTStFeedbackList" parameterType="TStFeedback" resultMap="TStFeedbackResult">
|
|
|
+ <include refid="selectTStFeedbackVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="successorComment != null and successorComment != ''"> and successor_comment = #{successorComment}</if>
|
|
|
+ <if test="updaterCode != null and updaterCode != ''"> and updater_code = #{updaterCode}</if>
|
|
|
+ <if test="updatedate != null "> and updatedate = #{updatedate}</if>
|
|
|
+ <if test="createrCode != null and createrCode != ''"> and creater_code = #{createrCode}</if>
|
|
|
+ <if test="createdate != null "> and createdate = #{createdate}</if>
|
|
|
+ <if test="feecbackType != null "> and feecback_type = #{feecbackType}</if>
|
|
|
+ and d.del_flag = 0
|
|
|
+ </where>
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
+ ${params.dataScope}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTStFeedbackById" parameterType="Long" resultMap="TStFeedbackResult">
|
|
|
+ <include refid="selectTStFeedbackVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTStFeedback" parameterType="TStFeedback">
|
|
|
+ insert into t_st_feedback
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="successorComment != null">successor_comment,</if>
|
|
|
+ <if test="updaterCode != null">updater_code,</if>
|
|
|
+ <if test="updatedate != null">updatedate,</if>
|
|
|
+ <if test="createrCode != null">creater_code,</if>
|
|
|
+ <if test="createdate != null">createdate,</if>
|
|
|
+ <if test="feecbackType != null">feecback_type,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="successorComment != null">#{successorComment},</if>
|
|
|
+ <if test="updaterCode != null">#{updaterCode},</if>
|
|
|
+ <if test="updatedate != null">#{updatedate},</if>
|
|
|
+ <if test="createrCode != null">#{createrCode},</if>
|
|
|
+ <if test="createdate != null">#{createdate},</if>
|
|
|
+ <if test="feecbackType != null">#{feecbackType},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTStFeedback" parameterType="TStFeedback">
|
|
|
+ update t_st_feedback
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="successorComment != null">successor_comment = #{successorComment},</if>
|
|
|
+ <if test="updaterCode != null">updater_code = #{updaterCode},</if>
|
|
|
+ <if test="updatedate != null">updatedate = #{updatedate},</if>
|
|
|
+ <if test="createrCode != null">creater_code = #{createrCode},</if>
|
|
|
+ <if test="createdate != null">createdate = #{createdate},</if>
|
|
|
+ <if test="feecbackType != null">feecback_type = #{feecbackType},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="deleteTStFeedbackById" parameterType="Long">
|
|
|
+ update t_st_feedback set del_flag = 2 where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="deleteTStFeedbackByIds" parameterType="String">
|
|
|
+ update t_st_feedback set del_flag = 2 where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|