From 70dcf4e610a0ec5fd6ca2c3daf9edf4957b30529 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: Tue, 25 Feb 2025 16:34:46 +0800
Subject: [PATCH] 考试制证修改
---
exam-system/src/main/resources/mapper/pay/CoalPayStudentMapper.xml | 61 ++++++++++++++++++++++++------
1 files changed, 49 insertions(+), 12 deletions(-)
diff --git a/exam-system/src/main/resources/mapper/pay/CoalPayStudentMapper.xml b/exam-system/src/main/resources/mapper/pay/CoalPayStudentMapper.xml
index 7078ba9..11ba69f 100644
--- a/exam-system/src/main/resources/mapper/pay/CoalPayStudentMapper.xml
+++ b/exam-system/src/main/resources/mapper/pay/CoalPayStudentMapper.xml
@@ -1,10 +1,29 @@
<?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.CoalPayStudentMapper">
<sql id="selectCoalPayStudentVo">
- select id, coal_pay_id, name, id_card, phone, sex, pay_code, pay_status,pay_type,order_id,file_data,gov_pay_status, update_by, update_time, create_by, create_time, del_flag from coal_pay_student
+ select id,
+ coal_pay_id,
+ name,
+ id_card,
+ phone,
+ sex,
+ pay_code,
+ pay_status,
+ pay_type,
+ order_id,
+ file_data,
+ gov_pay_status,
+ update_by,
+ update_time,
+ create_by,
+ create_time,
+ del_flag,
+ order_no,
+ pay_time
+ from coal_pay_student
</sql>
<insert id="insertCoalPayStudent">
insert into coal_pay_student
@@ -19,8 +38,10 @@
<if test="payStatus != null">pay_status,</if>
<if test="payType != null">pay_type,</if>
<if test="orderId!=null">order_id,</if>
+ <if test="orderNo != null and orderNo != '' ">order_no,</if>
<if test="fileData!=null">file_data,</if>
<if test="govPayStatus!=null">gov_pay_status,</if>
+ <if test="train!=null and train!=''">train,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
@@ -38,8 +59,10 @@
<if test="payStatus != null">#{payStatus},</if>
<if test="payType != null">#{payType},</if>
<if test="orderId!=null">#{orderId},</if>
+ <if test="orderNo != null and orderNo != '' ">#{orderNo},</if>
<if test="fileData!=null">#{fileData},</if>
<if test="govPayStatus!=null">#{govPayStatus},</if>
+ <if test="train!=null and train!=''">#{train},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
@@ -64,14 +87,13 @@
<if test="sex != null">sex = #{sex},</if>
<if test="payType != null">pay_type = #{payType},</if>
<if test="payCode != null">pay_code = #{payCode},</if>
+ <if test="payTime != null">pay_time = #{payTime},</if>
<if test="payStatus != null">pay_status = #{payStatus},</if>
<if test="orderId!=null">order_id=#{orderId},</if>
<if test="fileData!=null">file_data=#{fileData},</if>
<if test="govPayStatus!=null">gov_pay_status=#{govPayStatus},</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>
- <if test="createTime != null">create_time = #{createTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where id = #{id}
@@ -86,15 +108,30 @@
<update id="updateByCoalPayIdAndStatus">
update coal_pay_student
<trim prefix="SET" suffixOverrides=",">
- <if test="payType != null">pay_type = #{payType},</if>
+ <if test="payCode != null">pay_code = #{payCode},</if>
+ <if test="orderId!=null">order_id=#{orderId},</if>
+ <if test="orderNo!=null">order_no = #{orderNo},</if>
+ <if test="fileData!=null">file_data=#{fileData},</if>
+ <if test="govPayStatus!=null">gov_pay_status=#{govPayStatus},</if>
</trim>
- where coal_pay_id = #{coalPayId} and pay_status = 0
+ where coal_pay_id = #{coalPayId} and pay_status = 0 and pay_type = 2
+ </update>
+ <update id="updateByIdAndPayType">
+ update coal_pay_student
+ <trim prefix="SET" suffixOverrides=",">
+ <if test="payCode != null">pay_code = #{payCode},</if>
+ <if test="orderId!=null">order_id=#{orderId},</if>
+ <if test="orderNo!=null">order_no = #{orderNo},</if>
+ <if test="fileData!=null">file_data=#{fileData},</if>
+ <if test="govPayStatus!=null">gov_pay_status=#{govPayStatus},</if>
+ </trim>
+ where id = #{id} and pay_status = 0 and pay_type = 1
</update>
<select id="selectByCoalPayId" resultType="com.gkhy.exam.pay.entity.CoalPayStudent">
<include refid="selectCoalPayStudentVo"></include>
- where coal_pay_id = #{coalPayId}
- and del_flag =0
+ where coal_pay_id = #{coalPayId}
+ and del_flag =0
</select>
<select id="selectByCoalPayIdAndPayStatus" resultType="com.gkhy.exam.pay.entity.CoalPayStudent">
@@ -103,9 +140,9 @@
<if test="status == 0">
and pay_type = 2
</if>
- and coal_pay_id = #{id}
- and pay_status = #{status}
- and del_flag =0
+ and coal_pay_id = #{id}
+ and pay_status = #{status}
+ and del_flag =0
</where>
</select>
--
Gitblit v1.9.2