From 5d24aead2d1a45452942ddfc300fe6a232301a99 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 25 九月 2023 11:07:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml |   55 +++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 41 insertions(+), 14 deletions(-)

diff --git a/base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml b/base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
index cd5b7db..f8e3581 100644
--- a/base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
+++ b/base-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
@@ -6,22 +6,49 @@
         set state=0
         where id in (${ids})
     </update>
+
+    <!--鏌ヨ宸ヨ壓璺嚎鍒楄〃  宸﹁竟浜岀骇灞曠ず-->
     <select id="selectAllTechTem" resultType="java.util.Map">
+        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,
-        father,
-        element,
-        device_group
+               name,
+               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},'%')
-        </if>
+        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
+          and id = #{id}
+    </select>
+
+    <!--鏂板宸ヨ壓璺嚎-閫夋嫨绫诲瀷-->
+    <select id="chooseType" resultType="java.lang.String">
+        select distinct type
+        from mom_ocean.technology_template
+        where state = 1
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3