From 3c3ec87a6ac907d375f2fb78f0882ab9f30a1533 Mon Sep 17 00:00:00 2001
From: zhangc <zc@123>
Date: 星期一, 21 四月 2025 14:26:00 +0800
Subject: [PATCH] 999

---
 src/main/java/com/zy/common/utils/NavigateSolution.java |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/zy/common/utils/NavigateSolution.java b/src/main/java/com/zy/common/utils/NavigateSolution.java
index 0c632b9..1967be1 100644
--- a/src/main/java/com/zy/common/utils/NavigateSolution.java
+++ b/src/main/java/com/zy/common/utils/NavigateSolution.java
@@ -149,7 +149,7 @@
         ConfigService configService = SpringUtils.getBean(ConfigService.class);
         if (configService != null) {
             Config config = configService.selectOne(new EntityWrapper<Config>()
-                    .eq("config", "direction_map")
+                    .eq("code", "direction_map")
                     .eq("status", 1));
             if (config != null) {
                 mapDirection = config.getValue();
@@ -195,11 +195,13 @@
                 if (is_valid(x + 1, y))
                 {
                     NavigateNode node = new NavigateNode(x + 1, y);
+                    node.setNodeValue(map[x + 1][y]);
                     neighbour_node.add(node);
                 }
                 if (is_valid(x - 1, y))
                 {
-                    NavigateNode node = new NavigateNode(x -1, y);
+                    NavigateNode node = new NavigateNode(x - 1, y);
+                    node.setNodeValue(map[x - 1][y]);
                     neighbour_node.add(node);
                 }
             }
@@ -209,11 +211,13 @@
                 if (is_valid(x, y + 1))
                 {
                     NavigateNode node = new NavigateNode(x, y + 1);
+                    node.setNodeValue(map[x][y + 1]);
                     neighbour_node.add(node);
                 }
                 if (is_valid(x, y - 1))
                 {
                     NavigateNode node = new NavigateNode(x, y - 1);
+                    node.setNodeValue(map[x][y - 1]);
                     neighbour_node.add(node);
                 }
             }
@@ -223,11 +227,13 @@
                 if (is_valid(x, y + 1))
                 {
                     NavigateNode node = new NavigateNode(x, y + 1);
+                    node.setNodeValue(map[x][y + 1]);
                     neighbour_node.add(node);
                 }
                 if (is_valid(x, y - 1))
                 {
                     NavigateNode node = new NavigateNode(x, y - 1);
+                    node.setNodeValue(map[x][y - 1]);
                     neighbour_node.add(node);
                 }
             }
@@ -237,11 +243,13 @@
                 if (is_valid(x + 1, y))
                 {
                     NavigateNode node = new NavigateNode(x + 1, y);
+                    node.setNodeValue(map[x + 1][y]);
                     neighbour_node.add(node);
                 }
                 if (is_valid(x - 1, y))
                 {
-                    NavigateNode node = new NavigateNode(x -1, y);
+                    NavigateNode node = new NavigateNode(x - 1, y);
+                    node.setNodeValue(map[x - 1][y]);
                     neighbour_node.add(node);
                 }
             }

--
Gitblit v1.9.1