123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?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.TStFeedbackMMapper">
-
- <resultMap type="TStFeedbackM" id="TStFeedbackMResult">
- <result property="id" column="id" />
- <result property="monthlyFeedbackId" column="monthly_feedback_id" />
- <result property="overallComment" column="overall_comment" />
- <result property="deptName" column="dept_name" />
- </resultMap>
- <sql id="selectTStFeedbackMVo">
- select d.id, d.MENTOR_ID, d.overall_comment ,s.dept_name from t_st_feedback_m d
- left join sys_dept s on s.dept_id = d.dept_id
- </sql>
- <select id="selectTStFeedbackMList" parameterType="TStFeedbackM" resultMap="TStFeedbackMResult">
- <include refid="selectTStFeedbackMVo"/>
- <where>
- <if test="monthlyFeedbackId != null "> and monthly_feedback_id = #{monthlyFeedbackId}</if>
- <if test="overallComment != null and overallComment != ''"> and overall_comment = #{overallComment}</if>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- </select>
-
- <select id="selectTStFeedbackMById" parameterType="Long" resultMap="TStFeedbackMResult">
- <include refid="selectTStFeedbackMVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertTStFeedbackM" parameterType="TStFeedbackM">
- insert into t_st_feedback_m
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="monthlyFeedbackId != null">monthly_feedback_id,</if>
- <if test="overallComment != null">overall_comment,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="monthlyFeedbackId != null">#{monthlyFeedbackId},</if>
- <if test="overallComment != null">#{overallComment},</if>
- </trim>
- </insert>
- <update id="updateTStFeedbackM" parameterType="TStFeedbackM">
- update t_st_feedback_m
- <trim prefix="SET" suffixOverrides=",">
- <if test="monthlyFeedbackId != null">monthly_feedback_id = #{monthlyFeedbackId},</if>
- <if test="overallComment != null">overall_comment = #{overallComment},</if>
- </trim>
- where id = #{id}
- </update>
- <update id="deleteTStFeedbackMById" parameterType="Long">
- update t_st_feedback_m set del_flag = 2 where id = #{id}
- </update>
- <update id="deleteTStFeedbackMByIds" parameterType="String">
- update t_st_feedback_m set del_flag = 2 where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
-
- </mapper>
|