From 12c0569a2943c43e5dd71f35a41f32b59d8c9eea Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Wed, 21 Jul 2021 09:00:45 +0800
Subject: [PATCH] 巡逻任务

---
 src/main/java/org/springblade/modules/routeIn/mapper/RouteinMapper.xml |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/routeIn/mapper/RouteinMapper.xml b/src/main/java/org/springblade/modules/routeIn/mapper/RouteinMapper.xml
index 35f405b..21f7f59 100644
--- a/src/main/java/org/springblade/modules/routeIn/mapper/RouteinMapper.xml
+++ b/src/main/java/org/springblade/modules/routeIn/mapper/RouteinMapper.xml
@@ -23,9 +23,29 @@
         <result column="remarks" property="remarks"/>
     </resultMap>
 
+    <resultMap id="treeNodeResultMap" type="org.springblade.core.tool.node.TreeNode">
+        <id column="id" property="id"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="title" property="title"/>
+        <result column="value" property="value"/>
+        <result column="key" property="key"/>
+        <result column="has_children" property="hasChildren"/>
+    </resultMap>
+
 
     <select id="selectRouteinPage" resultMap="routeinResultMap">
         select * from sys_routein where is_deleted = 0
+    </select>
+
+    <select id="tree" resultMap="treeNodeResultMap">
+       SELECT
+        id,
+        0 AS parent_id,
+        routeName AS title,
+        id AS "value",
+        id AS "key"
+        FROM
+        sys_routein
     </select>
 
 
@@ -44,6 +64,18 @@
         <if test="routeName!=null and routeName!=''">
             and r.routeName  like '%${routeName}%'
         </if>
+        <if test="id!=null and id!=''">
+            AND r.id = #{id}
+        </if>
+    </select>
+
+    <!--巡逻路线详情-->
+    <select id="details" resultType="org.springblade.modules.routeIn.entity.Routein">
+        SELECT id,ST_ASTEXT (routeInfo) as routeInfo,user_id as userId FROM sys_routein
+        where 1=1
+        <if test="routein.userId!=null and routein.userId!='' ">
+            and user_id = #{routein.userId}
+        </if>
     </select>
 
 </mapper>

--
Gitblit v1.9.3