From 2e95a2b66132930106816be0217169680fd55282 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期二, 26 三月 2024 13:53:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/Four-Way-Rack' into Four-Way-Rack

---
 zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java
index 5622fc3..0da5f5a 100644
--- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java
+++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/map/service/MapService.java
@@ -14,6 +14,7 @@
 import org.springframework.stereotype.Service;
 
 import java.util.Date;
+import java.util.Optional;
 
 /**
  * Created by vincent on 3/15/2024
@@ -26,14 +27,16 @@
     @Autowired
     private DictService dictService;
 
+    public String getMapFloorList(Long userId) {
+        String floorKey = "map-floor-list";
+        Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>().eq(Dict::getFlag, floorKey));
+        return Optional.ofNullable(dict).map(Dict::getValue).orElse(null);
+    }
+
     public String getMapData(MapQueryParam param, Long userId) {
         String mapKey = getMapKey(param.getFloor());
         Dict dict = dictService.getOne(new LambdaQueryWrapper<Dict>().eq(Dict::getFlag, mapKey));
-        if (Cools.isEmpty(dict)) {
-            return null;
-        } else {
-            return dict.getValue();
-        }
+        return Optional.ofNullable(dict).map(Dict::getValue).orElse(null);
     }
 
     public void saveMapData(MapDataParam param, Long userId) {

--
Gitblit v1.9.1