From 06bc26e0f7639ba93b402acf8252c1c20a85b8c6 Mon Sep 17 00:00:00 2001
From: heheng <heheng@123456>
Date: 星期四, 23 一月 2025 16:14:58 +0800
Subject: [PATCH] 特种作业非煤缴费版本优化

---
 exam-system/src/main/resources/mapper/pay/NonCoalPayCategoryMapper.xml |   64 ++++++++++++++++++++------------
 1 files changed, 40 insertions(+), 24 deletions(-)

diff --git a/exam-system/src/main/resources/mapper/pay/NonCoalPayCategoryMapper.xml b/exam-system/src/main/resources/mapper/pay/NonCoalPayCategoryMapper.xml
index 0f5eb72..c836dcc 100644
--- a/exam-system/src/main/resources/mapper/pay/NonCoalPayCategoryMapper.xml
+++ b/exam-system/src/main/resources/mapper/pay/NonCoalPayCategoryMapper.xml
@@ -1,34 +1,45 @@
 <?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">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.gkhy.exam.pay.mapper.NonCoalPayCategoryMapper">
-    
+
     <resultMap type="NonCoalPayCategory" id="NonCoalPayCategoryResult">
-        <result property="id"    column="id"    />
-        <result property="nonCoalPayId"    column="non_coal_pay_id"    />
-        <result property="categoryId"    column="category_id"    />
-        <result property="categoryType"    column="category_type"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="delFlag"    column="del_flag"    />
+        <result property="id" column="id"/>
+        <result property="nonCoalPayId" column="non_coal_pay_id"/>
+        <result property="categoryId" column="category_id"/>
+        <result property="categoryType" column="category_type"/>
+        <result property="categoryAmount" column="category_amount"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="delFlag" column="del_flag"/>
     </resultMap>
 
     <sql id="selectNonCoalPayCategoryVo">
-        select id, non_coal_pay_id, category_id, category_type, update_by, update_time, create_by, create_time, del_flag from non_coal_pay_category
+        select id,
+               non_coal_pay_id,
+               category_id,
+               category_type,
+               category_amount,
+               update_by,
+               update_time,
+               create_by,
+               create_time,
+               del_flag
+        from non_coal_pay_category
     </sql>
 
     <select id="selectNonCoalPayCategoryList" parameterType="NonCoalPayCategory" resultMap="NonCoalPayCategoryResult">
         <include refid="selectNonCoalPayCategoryVo"/>
-        <where>  
-            <if test="nonCoalPayId != null "> and non_coal_pay_id = #{nonCoalPayId}</if>
-            <if test="categoryId != null "> and category_id = #{categoryId}</if>
-            <if test="categoryType != null "> and category_type = #{categoryType}</if>
+        <where>
+            <if test="nonCoalPayId != null ">and non_coal_pay_id = #{nonCoalPayId}</if>
+            <if test="categoryId != null ">and category_id = #{categoryId}</if>
+            <if test="categoryType != null ">and category_type = #{categoryType}</if>
         </where>
     </select>
-    
+
     <select id="selectNonCoalPayCategoryById" parameterType="Long" resultMap="NonCoalPayCategoryResult">
         <include refid="selectNonCoalPayCategoryVo"/>
         where id = #{id}
@@ -41,23 +52,25 @@
             <if test="nonCoalPayId != null">non_coal_pay_id,</if>
             <if test="categoryId != null">category_id,</if>
             <if test="categoryType != null">category_type,</if>
+            <if test="categoryAmount != null">category_amount,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="delFlag != null">del_flag,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
             <if test="nonCoalPayId != null">#{nonCoalPayId},</if>
             <if test="categoryId != null">#{categoryId},</if>
             <if test="categoryType != null">#{categoryType},</if>
+            <if test="categoryAmount != null">#{categoryAmount},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="delFlag != null">#{delFlag},</if>
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateNonCoalPayCategory" parameterType="NonCoalPayCategory">
@@ -66,6 +79,7 @@
             <if test="nonCoalPayId != null">non_coal_pay_id = #{nonCoalPayId},</if>
             <if test="categoryId != null">category_id = #{categoryId},</if>
             <if test="categoryType != null">category_type = #{categoryType},</if>
+            <if test="categoryAmount != null">category_amount = #{categoryAmount},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
@@ -75,12 +89,14 @@
         where id = #{id}
     </update>
 
-    <delete id="deleteNonCoalPayCategoryById" parameterType="Long">
-        delete from non_coal_pay_category where id = #{id}
-    </delete>
+    <update id="deleteNonCoalPayCategoryById" parameterType="Long">
+        update non_coal_pay_category
+        set del_flag = 2
+        where non_coal_pay_id = #{id}
+    </update>
 
     <delete id="deleteNonCoalPayCategoryByIds" parameterType="String">
-        delete from non_coal_pay_category where id in 
+        delete from non_coal_pay_category where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>

--
Gitblit v1.9.2