教育训练处考试制证系统后端
“djh”
2025-03-24 631ead73058002bafa9a5a47f092e85d87c9a5d8
缴费回调修改
已修改4个文件
18 ■■■■■ 文件已修改
exam-system/src/main/java/com/gkhy/exam/pay/controller/PaymentApiController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/PaymentServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/utils/PayUtils.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/controller/PaymentApiController.java
@@ -37,6 +37,7 @@
            }
            jsonObject1.put("orderNo", orderNo);
            jsonObject1.put("status", "success");
            log.info("返回财政参数:"+jsonObject1);
            return jsonObject1;
        } catch (Exception e) {
            log.info("财政回调处理订单发生错误");
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/PaymentServiceImpl.java
@@ -52,7 +52,7 @@
                    .eq(CoalPayStudent::getOrderNo, orderNo).eq(CoalPayStudent::getDelFlag, 0)
                    .eq(CoalPayStudent::getPayStatus, 0));
        }
        notifyConfirm(orderNo);
        payUtils.asyncNotrify(orderNo);
    }
exam-system/src/main/java/com/gkhy/exam/pay/utils/PayUtils.java
@@ -9,6 +9,7 @@
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson2.JSONObject;
import com.gkhy.exam.pay.entity.PayReqData;
import com.ruoyi.common.utils.Threads;
import com.xjhys.edu.fee.sdk.client.BillClient;
import com.xjhys.edu.fee.sdk.client.impl.ClientFactory;
import com.xjhys.edu.fee.sdk.model.ResponseDataVo;
@@ -46,6 +47,7 @@
import org.dom4j.io.XMLWriter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import sun.misc.BASE64Encoder;
@@ -290,6 +292,17 @@
        return params;
    }
    @Async
    public void asyncNotrify(String orderNo){
        try {
            Threads.sleep(2000);
            affirmPost(orderNo);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    //缴费结果确认查询
    public String affirmPost(String orderNo) throws IOException {
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
@@ -4,12 +4,14 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.scheduling.annotation.EnableAsync;
/**
 * 启动程序
 * 
 * @author ruoyi
 */
@EnableAsync
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class },scanBasePackages = {"com.gkhy","com.ruoyi"})
public class RuoYiApplication
{