From 6a19365f5dea396622b32afe28b3e4b9b067e0e1 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 01 九月 2023 16:33:08 +0800
Subject: [PATCH] 标准BOM(完结)

---
 standard-server/src/main/resources/mapper/TechnologyMapper.xml |   35 ++++++++++++++++++++++++++++++++++-
 1 files changed, 34 insertions(+), 1 deletions(-)

diff --git a/standard-server/src/main/resources/mapper/TechnologyMapper.xml b/standard-server/src/main/resources/mapper/TechnologyMapper.xml
index aacc7ab..bfdd39d 100644
--- a/standard-server/src/main/resources/mapper/TechnologyMapper.xml
+++ b/standard-server/src/main/resources/mapper/TechnologyMapper.xml
@@ -12,7 +12,7 @@
 
     <!--鍙充晶鏁版嵁灞曠ず 宸ヨ壓璺嚎-->
     <resultMap id="selectAllTecMap" type="map">
-        <id property="father" column="father"/>
+        <id property="name" column="father"/>
         <collection property="children" resultMap="selectAllTecMaps" javaType="List"/>
     </resultMap>
     <resultMap id="selectAllTecMaps" type="map">
@@ -35,4 +35,37 @@
             and father like concat('%',#{message},'%')
         </if>
     </select>
+
+    <!--鍙充笂瑙掓柊澧�-宸ヨ壓璺嚎-閫夋嫨宸ュ簭-->
+    <select id="chooseFather" resultType="java.util.Map">
+        select distinct father
+        from mom_ocean.technology
+        where state = 1
+          and specifications_id = #{specificationsId}
+    </select>
+
+    <!--鍙充笂瑙掓柊澧�-鎶�鏈寚鏍�-閫夋嫨宸ュ簭,宸ヨ壓-->
+    <resultMap id="chooseTechMap" type="map">
+        <id property="name" column="father"/>
+        <collection property="children" resultMap="chooseTechMaps" javaType="List"/>
+    </resultMap>
+    <resultMap id="chooseTechMaps" type="map">
+        <id property="id" column="id"/>
+        <result property="name" column="name"/>
+    </resultMap>
+    <select id="chooseTech" resultMap="chooseTechMap">
+        select id,
+               name,
+               father
+        from mom_ocean.technology
+        where state = 1
+          and specifications_id = #{specificationsId}
+    </select>
+
+    <!--鎵归噺鍒犻櫎-->
+    <update id="delAllTech">
+        update mom_ocean.technology
+        set state=0
+        where id in (${ids})
+    </update>
 </mapper>

--
Gitblit v1.9.3