From 0c1f76c4a9c34a2adb05a94da4b20f3560374a29 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 19 四月 2024 15:52:27 +0800
Subject: [PATCH] 考核模板

---
 ycl-server/src/main/resources/mapper/zgyw/CheckTemplateRuleMapper.xml |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/ycl-server/src/main/resources/mapper/zgyw/CheckTemplateRuleMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/CheckTemplateRuleMapper.xml
index 0f94c61..0a25529 100644
--- a/ycl-server/src/main/resources/mapper/zgyw/CheckTemplateRuleMapper.xml
+++ b/ycl-server/src/main/resources/mapper/zgyw/CheckTemplateRuleMapper.xml
@@ -5,16 +5,14 @@
 <mapper namespace="com.ycl.platform.mapper.CheckTemplateRuleMapper">
     
     <resultMap type="com.ycl.platform.domain.entity.CheckTemplateRule" id="CheckTemplateRuleResult">
-        <result property="id"    column="id"    />
+        <result property="id"    column="id" />
         <result property="checkTemplateId"    column="check_template_id"    />
         <result property="checkRuleId"    column="check_rule_id"    />
         <result property="weight"    column="weight"    />
-        <result property="maxScore"    column="max_score"    />
-        <result property="auditState"    column="audit_state"    />
     </resultMap>
 
     <sql id="selectCheckTemplateRuleVo">
-        select id, check_template_id, check_rule_id, weight, max_score, audit_state from t_check_template_rule
+        select id, check_template_id, check_rule_id, weight from t_check_template_rule
     </sql>
 
     <select id="selectCheckTemplateRuleList" resultMap="CheckTemplateRuleResult">
@@ -22,7 +20,6 @@
         <where>  
             <if test="checkTemplateId != null "> and check_template_id = #{checkTemplateId}</if>
             <if test="checkRuleId != null "> and check_rule_id = #{checkRuleId}</if>
-            <if test="auditState != null "> and audit_state = #{auditState}</if>
         </where>
     </select>
     
@@ -37,15 +34,11 @@
             <if test="checkTemplateId != null">check_template_id,</if>
             <if test="checkRuleId != null">check_rule_id,</if>
             <if test="weight != null">weight,</if>
-            <if test="maxScore != null">max_score,</if>
-            <if test="auditState != null">audit_state,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="checkTemplateId != null">#{checkTemplateId},</if>
             <if test="checkRuleId != null">#{checkRuleId},</if>
             <if test="weight != null">#{weight},</if>
-            <if test="maxScore != null">#{maxScore},</if>
-            <if test="auditState != null">#{auditState},</if>
          </trim>
     </insert>
 
@@ -55,8 +48,6 @@
             <if test="checkTemplateId != null">check_template_id = #{checkTemplateId},</if>
             <if test="checkRuleId != null">check_rule_id = #{checkRuleId},</if>
             <if test="weight != null">weight = #{weight},</if>
-            <if test="maxScore != null">max_score = #{maxScore},</if>
-            <if test="auditState != null">audit_state = #{auditState},</if>
         </trim>
         where id = #{id}
     </update>
@@ -71,4 +62,11 @@
             #{id}
         </foreach>
     </delete>
+
+    <delete id="deleteByTemplateId">
+        delete from t_check_template_rule where check_template_id = #{templateId}
+    </delete>
+    <select id="selectListByTemplateId" resultType="com.ycl.platform.domain.entity.CheckTemplateRule">
+        select * from t_check_template_rule where check_template_id = #{checkTemplateId}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0