From f9a85d68b1a08b03753d297f76bd4e87bb4d2b3e Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期四, 11 四月 2024 14:42:26 +0800
Subject: [PATCH] fix:手动抬杆接口更新

---
 src/main/java/com/boying/controller/car/PlateServlet2.java |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/boying/controller/car/PlateServlet2.java b/src/main/java/com/boying/controller/car/PlateServlet2.java
index 1d17a39..302f3a5 100644
--- a/src/main/java/com/boying/controller/car/PlateServlet2.java
+++ b/src/main/java/com/boying/controller/car/PlateServlet2.java
@@ -17,6 +17,8 @@
 
 import com.sun.media.jfxmedia.track.Track;
 import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -46,7 +48,10 @@
 @RequiredArgsConstructor
 public class PlateServlet2 extends HttpServlet {
     private static final long serialVersionUID = 1L;
-    private final SystemConfigProperties systemConfigProperties;
+    @Value("${ffpark.logPath}")
+    private String logPath;
+//    @Autowired
+//    private final SystemConfigProperties systemConfigProperties;
     private final StringRedisTemplate redisTemplate;
     private final ParkService parkService;
     private final OutParkService outParkService;
@@ -294,7 +299,7 @@
         SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
         try
         {
-            FileWriter f = new FileWriter(systemConfigProperties.getLogPath()+sdf.format(new Date())+".txt",true);
+            FileWriter f = new FileWriter(logPath+sdf.format(new Date())+".txt",true);
             BufferedWriter bw=new BufferedWriter(f);
             bw.write(txt);
             bw.newLine();

--
Gitblit v1.9.1