From c28d3bb363dde2afb44c168b93379b2bf6b1f67f Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期四, 07 九月 2023 15:26:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 standard-server/src/main/resources/mapper/TechnologyMapper.xml |   45 ++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 44 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..c01980b 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,47 @@
             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>
+    <!--鏌ヨ璇ュ瀷鍙峰伐鑹轰笅鏈�鏂扮増鏈殑宸ヨ壓id-->
+    <select id="selTech" resultType="java.lang.Integer">
+        select id
+        from mom_ocean.technology
+        where state = 1
+          and father = #{techfather}
+          and name = #{techname}
+          and specifications_id = #{specificationId}
+          and version = #{version}
+    </select>
+
+    <!--鎵归噺鍒犻櫎-->
+    <update id="delAllTech">
+        update mom_ocean.technology
+        set state=0
+        where id in (${ids})
+    </update>
 </mapper>

--
Gitblit v1.9.3