From 5a88c770debe086dd82ab5ce8a4c957a3debdae7 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期五, 24 一月 2025 17:07:09 +0800
Subject: [PATCH] 煤矿缴费修改

---
 exam-system/src/main/resources/mapper/pay/CoalPayStudentMapper.xml |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/exam-system/src/main/resources/mapper/pay/CoalPayStudentMapper.xml b/exam-system/src/main/resources/mapper/pay/CoalPayStudentMapper.xml
index 0e3f2f9..7078ba9 100644
--- a/exam-system/src/main/resources/mapper/pay/CoalPayStudentMapper.xml
+++ b/exam-system/src/main/resources/mapper/pay/CoalPayStudentMapper.xml
@@ -83,6 +83,13 @@
         </trim>
         where coal_pay_id = #{coalPayId} and pay_status = 0
     </update>
+    <update id="updateByCoalPayIdAndStatus">
+        update coal_pay_student
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="payType != null">pay_type = #{payType},</if>
+        </trim>
+        where coal_pay_id = #{coalPayId} and pay_status = 0
+    </update>
 
     <select id="selectByCoalPayId" resultType="com.gkhy.exam.pay.entity.CoalPayStudent">
         <include refid="selectCoalPayStudentVo"></include>
@@ -92,8 +99,14 @@
 
     <select id="selectByCoalPayIdAndPayStatus" resultType="com.gkhy.exam.pay.entity.CoalPayStudent">
         <include refid="selectCoalPayStudentVo"></include>
-        where coal_pay_id = #{id} and pay_status = #{status}
-            and del_flag =0
+        <where>
+            <if test="status == 0">
+                and pay_type = 2
+            </if>
+                and coal_pay_id = #{id}
+                and pay_status = #{status}
+                and del_flag =0
+        </where>
     </select>
 
     <select id="selectByIds" resultType="com.gkhy.exam.pay.entity.CoalPayStudent">

--
Gitblit v1.9.2