From 22899f74279a47f4ec79e1325f8489d948ced005 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 15 九月 2023 17:24:44 +0800
Subject: [PATCH] 修改2.0   9.15

---
 base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml |   49 ++++++++++++++++++++++++++++++++++---------------
 1 files changed, 34 insertions(+), 15 deletions(-)

diff --git a/base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml b/base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
index cd5b7db..31bf07d 100644
--- a/base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
+++ b/base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
@@ -6,22 +6,41 @@
         set state=0
         where id in (${ids})
     </update>
+
+    <!--鏌ヨ宸ヨ壓璺嚎鍒楄〃  宸﹁竟浜岀骇灞曠ず-->
     <select id="selectAllTechTem" resultType="java.util.Map">
-        select id,
-        name,
-        father,
-        element,
-        device_group
-        from mom_ocean.technology_template
-        where state=1
-        <if test="type!=null">
-            and type=#{type}
-        </if>
-        <if test="name!=null and name!=''">
-            and name like concat('%',#{name},'%')
-        </if>
-        <if test="father!=null and father!=''">
-            and father like concat('%',#{father},'%')
+        select distinct
+        father
+        from mom_ocean.technology_template t
+        where t.state = 1
+        and type=#{type}
+        <if test="message!=null and message!=''">
+            and father like concat('%',#{message},'%')
         </if>
     </select>
+
+    <!--鏌ヨ宸ヨ壓璺嚎鍒楄〃 鍙宠竟灞曠ず宸ヨ壓鍜岃澶�-->
+    <select id="selectAllTechNam" resultType="java.util.Map">
+        select id,
+               name,
+               element,
+               device_group
+        from mom_ocean.technology_template
+        where state = 1
+          and father = #{father}
+    </select>
+
+    <!--鏂板宸ヨ壓璺嚎 閫夋嫨宸ュ簭-->
+    <select id="chooseTech" resultType="java.lang.String">
+        select distinct father
+        from mom_ocean.technology_template
+        where state = 1
+          and type = #{type}
+    </select>
+
+    <!--鏍规嵁id鏌ョ湅璇︽儏-->
+    <select id="selecTechById" resultType="java.util.Map">
+        select * from mom_ocean.technology_template where state=1
+    </select>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3