|
@@ -0,0 +1,84 @@
|
|
|
+<?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.TStPlanFeedbackMapper">
|
|
|
+
|
|
|
+ <resultMap type="TStPlanFeedback" id="TStPlanFeedbackResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="planId" column="plan_id" />
|
|
|
+ <result property="question" column="question" />
|
|
|
+ <result property="answer" column="answer" />
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTStPlanFeedbackVo">
|
|
|
+ select id,plan_id,QUESTION1,QUESTION2,QUESTION3,ANSWER1,ANSWER2,ANSWER3 from t_st_plan_feedback
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTStPlanFeedbackList" parameterType="TStPlanFeedback" resultMap="TStPlanFeedbackResult">
|
|
|
+ <include refid="selectTStPlanFeedbackVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="planId != null "> and plan_id = #{planId}</if>
|
|
|
+ <if test="question != null and question != ''"> and question = #{question}</if>
|
|
|
+ <if test="answer != null and answer != ''"> and answer = #{answer}</if>
|
|
|
+ and d.del_flag = 0
|
|
|
+ </where>
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
+ ${params.dataScope}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTStPlanFeedbackById" parameterType="Long" resultMap="TStPlanFeedbackResult">
|
|
|
+ <include refid="selectTStPlanFeedbackVo"/>
|
|
|
+ where plan_id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTStPlanFeedback" parameterType="TStPlanFeedback">
|
|
|
+ <selectKey keyProperty="id" resultType="long" order="BEFORE">
|
|
|
+ SELECT seq_t_st_plan_feedback.NEXTVAL as id FROM DUAL
|
|
|
+ </selectKey>
|
|
|
+ insert into t_st_plan_feedback
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="planId != null">plan_id,</if>
|
|
|
+ <if test="question1 != null">question1,</if>
|
|
|
+ <if test="question2 != null">question2,</if>
|
|
|
+ <if test="question3 != null">question3,</if>
|
|
|
+ <if test="answer1 != null">answer1,</if>
|
|
|
+ <if test="answer2 != null">answer2,</if>
|
|
|
+ <if test="answer3 != null">answer3,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="planId != null">#{planId},</if>
|
|
|
+ <if test="question1 != null">#{question1},</if>
|
|
|
+ <if test="question2 != null">#{question2},</if>
|
|
|
+ <if test="question3 != null">#{question3},</if>
|
|
|
+ <if test="answer1 != null">#{answer1},</if>
|
|
|
+ <if test="answer2 != null">#{answer2},</if>
|
|
|
+ <if test="answer3 != null">#{answer3},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTStPlanFeedback" parameterType="TStPlanFeedback">
|
|
|
+ update t_st_plan_feedback
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="planId != null">plan_id = #{planId},</if>
|
|
|
+ <if test="question != null">question = #{question},</if>
|
|
|
+ <if test="answer != null">answer = #{answer},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="deleteTStPlanFeedbackById" parameterType="Long">
|
|
|
+ update t_st_plan_feedback set del_flag = 2 where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <update id="deleteTStPlanFeedbackByIds" parameterType="String">
|
|
|
+ update t_st_plan_feedback set del_flag = 2 where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
+</mapper>
|