From 8d9c26c91eff811b8c4193e31f7b9e3e4dd56812 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 13 八月 2025 15:26:28 +0800
Subject: [PATCH] 修改bug

---
 DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/zhenglian/ZhengLianConfig.java |   88 ++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 88 insertions(+), 0 deletions(-)

diff --git a/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/zhenglian/ZhengLianConfig.java b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/zhenglian/ZhengLianConfig.java
new file mode 100644
index 0000000..6122d5c
--- /dev/null
+++ b/DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/zhenglian/ZhengLianConfig.java
@@ -0,0 +1,88 @@
+package com.stylefeng.guns.modular.system.util.zhenglian;
+
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author zhibing.pu
+ * @Date 2025/7/8 11:31
+ */
+@Data
+@Component
+public class ZhengLianConfig {
+	
+	@Value("${spring.profiles.active}")
+	private String activeProfile;
+	/**
+	 * 接口地址
+	 */
+	private String url;
+	/**
+	 * appid
+	 */
+	private String appid;
+	/**
+	 * 商户号
+	 */
+	private String merchNo;
+	/**
+	 * 加密证书序列号
+	 */
+	private String encrpNo;
+	/**
+	 * 签名证书序列号
+	 */
+	private String signNo;
+	/**
+	 * 证书
+	 */
+	private String cer;
+	/**
+	 * 证书
+	 */
+	private String sm2;
+	/**
+	 *
+	 */
+	private String password;
+	
+	/**
+	 * 获取不同环境的配置
+	 * @return
+	 */
+	public ZhengLianConfig getZhengLianConfig() {
+		if("dev".equals(activeProfile)){
+			this.url = "https://gatewaytest.zqpay.com";
+			this.appid = "F9BFEEA567196A92E053376010ACF004";
+			this.merchNo = "B00000871";
+			this.encrpNo = "1055490595";
+			this.signNo = "1066348524";
+			this.cer = "C:\\Users\\Admin\\Desktop\\qyt\\1055490595.cer";
+			this.sm2 = "C:\\Users\\Admin\\Desktop\\qyt\\871_111111.sm2";
+			this.password = "111111";
+		}
+		if("test".equals(activeProfile)){
+			this.url = "https://gatewaytest.zqpay.com";
+			this.appid = "F9BFEEA567196A92E053376010ACF004";
+			this.merchNo = "B00000871";
+			this.encrpNo = "1055490595";
+			this.signNo = "1066348524";
+			this.cer = "/etraffic/server/1055490595.cer";
+			this.sm2 = "/etraffic/server/871_111111.sm2";
+			this.password = "111111";
+		}
+		if("prod".equals(activeProfile)){
+			this.url = "https://gateway.zqpay.com";
+			this.appid = "3e06da1751ec1626b30f7703a088f298";
+			this.merchNo = "B00000402";
+			this.encrpNo = "1342935640";
+			this.signNo = "1471742568";
+			this.cer = "/etraffic/server/1342935640.cer";
+			this.sm2 = "/etraffic/server/1342935640.sm2";
+			this.password = "31028Mky";
+		}
+		return this;
+	}
+	
+}

--
Gitblit v1.7.1