From 0f4459e4201fdc19185b7dd03215871f036acd70 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期三, 28 五月 2025 16:45:01 +0800
Subject: [PATCH] Merge branch 'dev' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile into dev

---
 ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/barrierGate/server/SwitchwayGateService.java |   24 +++---------------------
 1 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/barrierGate/server/SwitchwayGateService.java b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/barrierGate/server/SwitchwayGateService.java
index c20f360..4bd5357 100644
--- a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/barrierGate/server/SwitchwayGateService.java
+++ b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/barrierGate/server/SwitchwayGateService.java
@@ -18,10 +18,6 @@
 
 	private final String url = "http://8.137.103.127/universal";
 	
-	private final String appkey = "886621e841fc44c1ad63a823d";
-	
-	private final String secretkey = "7d87c2c36bea4749b30f38f4d";
-	
 	
 	/**
 	 * 开关道闸
@@ -30,32 +26,18 @@
 	 */
 	public Boolean gateService(SwitchwayGateReq req){
 		SwitchwayGate switchwayGate = new SwitchwayGate()
-				.setAppkey(appkey)
+				.setAppkey(req.getAppkey())
 				.setAction(req.getAction())
 				.setChannel(req.getChannel())
 				.setTimestamp(System.currentTimeMillis() + "")
-				.build(secretkey);
+				.build(req.getSecretkey());
 		String body = JSON.toJSONString(switchwayGate);
 		String result = HttpUtil.post(url + "/gateService", body);
 		JSONObject jsonObject = JSON.parseObject(result);
 		Boolean success = jsonObject.getBoolean("success");
 		if(!success){
-			log.error("调用开关道闸失败:\n请求参数:{}\n返回结果:{}", body, result);
+			log.info("调用开关道闸失败:\n请求参数:{}\n返回结果:{}", body, result);
 		}
 		return success;
 	}
-	
-	
-//	public static void main(String[] args) {
-//		SwitchwayGateService switchwayGateService = new SwitchwayGateService();
-//		SwitchwayGateReq req = new SwitchwayGateReq();
-//		req.setAction("close");
-//		req.setChannel("001");
-//		Boolean success = switchwayGateService.gateService(req);
-//		if(success){
-//			log.info("调用成功");
-//		}else{
-//			log.info("调用失败");
-//		}
-//	}
 }

--
Gitblit v1.7.1