Parcourir la source

王子文 专项培训

wangggziwen il y a 3 ans
Parent
commit
1023a301e0

+ 64 - 0
master/src/main/java/com/ruoyi/project/training/spec/domain/TStPlanFeedback.java

@@ -1,10 +1,13 @@
 package com.ruoyi.project.training.spec.domain;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.framework.aspectj.lang.annotation.Excel;
 import com.ruoyi.framework.web.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
+import java.util.Date;
+
 /**
  * 专项培训反馈对象 t_st_plan_feedback
  *
@@ -46,6 +49,67 @@ public class TStPlanFeedback extends BaseEntity
     @Excel(name = "答案3")
     private String answer3;
 
+    /** 删除状态 */
+    private Long delFlag;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    private String createerCode;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date createdate;
+
+    /** 修改人 */
+    @Excel(name = "修改人")
+    private String updaterCode;
+
+    /** 修改时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date updatedate;
+
+    public Long getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDelFlag(Long delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getCreateerCode() {
+        return createerCode;
+    }
+
+    public void setCreateerCode(String createerCode) {
+        this.createerCode = createerCode;
+    }
+
+    public Date getCreatedate() {
+        return createdate;
+    }
+
+    public void setCreatedate(Date createdate) {
+        this.createdate = createdate;
+    }
+
+    public String getUpdaterCode() {
+        return updaterCode;
+    }
+
+    public void setUpdaterCode(String updaterCode) {
+        this.updaterCode = updaterCode;
+    }
+
+    public Date getUpdatedate() {
+        return updatedate;
+    }
+
+    public void setUpdatedate(Date updatedate) {
+        this.updatedate = updatedate;
+    }
+
     public static long getSerialVersionUID() {
         return serialVersionUID;
     }

+ 121 - 0
master/src/main/resources/mybatis/training/spec/TStPlanFeedbackMapper.xml

@@ -0,0 +1,121 @@
+<?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="question1"    column="question1"    />
+        <result property="question2"    column="question2"    />
+        <result property="question3"    column="question3"    />
+        <result property="answer1"    column="answer1"    />
+        <result property="answer2"    column="answer2"    />
+        <result property="answer3"    column="answer3"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createerCode"    column="createer_code"    />
+        <result property="createdate"    column="createdate"    />
+        <result property="updaterCode"    column="updater_code"    />
+        <result property="updatedate"    column="updatedate"    />
+        <result property="deptName" column="dept_name" />
+    </resultMap>
+
+    <sql id="selectTStPlanFeedbackVo">
+        select d.id, d.plan_id, d.question1, d.question2, d.question3, d.answer1, d.answer2, d.answer3, d.del_flag, d.createer_code, d.createdate, d.updater_code, d.updatedate from t_st_plan_feedback d
+
+    </sql>
+
+    <select id="selectTStPlanFeedbackList" parameterType="TStPlanFeedback" resultMap="TStPlanFeedbackResult">
+        <include refid="selectTStPlanFeedbackVo"/>
+        <where>  
+            <if test="planId != null "> and plan_id = #{planId}</if>
+            <if test="question1 != null  and question1 != ''"> and question1 = #{question1}</if>
+            <if test="question2 != null  and question2 != ''"> and question2 = #{question2}</if>
+            <if test="question3 != null  and question3 != ''"> and question3 = #{question3}</if>
+            <if test="answer1 != null  and answer1 != ''"> and answer1 = #{answer1}</if>
+            <if test="answer2 != null  and answer2 != ''"> and answer2 = #{answer2}</if>
+            <if test="answer3 != null  and answer3 != ''"> and answer3 = #{answer3}</if>
+            <if test="createerCode != null  and createerCode != ''"> and createer_code = #{createerCode}</if>
+            <if test="createdate != null "> and createdate = #{createdate}</if>
+            <if test="updaterCode != null  and updaterCode != ''"> and updater_code = #{updaterCode}</if>
+            <if test="updatedate != null "> and updatedate = #{updatedate}</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>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createerCode != null">createer_code,</if>
+            <if test="createdate != null">createdate,</if>
+            <if test="updaterCode != null">updater_code,</if>
+            <if test="updatedate != null">updatedate,</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>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createerCode != null">#{createerCode},</if>
+            <if test="createdate != null">#{createdate},</if>
+            <if test="updaterCode != null">#{updaterCode},</if>
+            <if test="updatedate != null">#{updatedate},</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="question1 != null">question1 = #{question1},</if>
+            <if test="question2 != null">question2 = #{question2},</if>
+            <if test="question3 != null">question3 = #{question3},</if>
+            <if test="answer1 != null">answer1 = #{answer1},</if>
+            <if test="answer2 != null">answer2 = #{answer2},</if>
+            <if test="answer3 != null">answer3 = #{answer3},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createerCode != null">createer_code = #{createerCode},</if>
+            <if test="createdate != null">createdate = #{createdate},</if>
+            <if test="updaterCode != null">updater_code = #{updaterCode},</if>
+            <if test="updatedate != null">updatedate = #{updatedate},</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>