From bc472feefdfc4afbcb0fcd35a8fb8d047edf6a9f Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期二, 18 二月 2025 16:50:30 +0800
Subject: [PATCH] 煤矿缴费修改

---
 exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayStudentServiceImpl.java |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayStudentServiceImpl.java b/exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayStudentServiceImpl.java
index c6df39a..6703e96 100644
--- a/exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayStudentServiceImpl.java
+++ b/exam-system/src/main/java/com/gkhy/exam/pay/service/impl/NonCoalPayStudentServiceImpl.java
@@ -1,5 +1,6 @@
 package com.gkhy.exam.pay.service.impl;
 
+import com.alibaba.fastjson2.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -174,6 +175,25 @@
         if (nonCoalStuRep.getPayStatus() == 1) {
             throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, "已缴费请勿重复缴费");
         }
+        if (nonCoalStuRep.getGovPayStatus() == 2 && nonCoalStuRep.getPayStatus() == 0) {
+            try {
+                JSONObject result = payUtils.query(nonCoalStuRep.getOrderNo());
+                String status = result.getString("status");
+                if (("1").equals(status)) {
+
+                    nonCoalPayStudentMapper.update(null, Wrappers.<NonCoalPayStudent>lambdaUpdate()
+                            .set(NonCoalPayStudent::getPayStatus, 1)
+                            .set(NonCoalPayStudent::getPayTime, result.getDate("payTime"))
+                            .eq(NonCoalPayStudent::getOrderNo, nonCoalStuRep.getOrderNo()).eq(NonCoalPayStudent::getDelFlag, 0)
+                            .eq(NonCoalPayStudent::getPayStatus, 0));
+                } else if (status == null) {
+                    log.error("查询财政订单失败:" + result.getString("respmsg") + ",错误编码:" + result.getString("respcode"));
+                }
+            } catch (Exception e) {
+                log.error("查询财政订单失败:" + e.getMessage());
+
+            }
+        }
 
         return nonCoalStuRep;
     }

--
Gitblit v1.9.2