From 1bad96e94164e9252bb723e1e2e0ccff31744842 Mon Sep 17 00:00:00 2001
From: whyclxw <810412026@qq.com>
Date: 星期日, 19 一月 2025 14:01:37 +0800
Subject: [PATCH] 添加锁

---
 src/main/java/com/whyc/service/LockInfService.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/whyc/service/LockInfService.java b/src/main/java/com/whyc/service/LockInfService.java
index 08a30c4..cb43b3a 100644
--- a/src/main/java/com/whyc/service/LockInfService.java
+++ b/src/main/java/com/whyc/service/LockInfService.java
@@ -17,6 +17,7 @@
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -45,7 +46,11 @@
             linf.setLockName(lockInf.getLockName()+(i+1));
             linf.setLockType(lockInf.getLockType());
             linf.setLockState(-1);
-            linf.setLockAddress(lockInf.getLockAddress());
+            if(lockInf.getLockAddress()!=null){
+                linf.setLockAddress(lockInf.getLockAddress());
+            }else{
+                linf.setLockAddress("");
+            }
             linf.setLockPath("");
             linf.setLatitude(lockInf.getLatitude());
             linf.setLongitude(lockInf.getLongitude());
@@ -53,6 +58,8 @@
             linf.setScreenBoxType(lockInf.getScreenBoxType());
             linf.setScreenBoxProduct(lockInf.getScreenBoxProduct());
             linf.setScreenFlag(lockInf.getScreenFlag());
+            linf.setLockOnline(0);
+            linf.setLastUpdateTime(new Date());
             list.add(linf);
         }
         mapper.insertBatchSomeColumn(list);

--
Gitblit v1.9.1