From 2d6a0cdcb1e31510a6f7776abab17cc5cb82fdcb Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 13 九月 2023 17:50:04 +0800
Subject: [PATCH] 修改2.0   9.13

---
 standard-server/src/main/resources/mapper/TechniqueMapper.xml |   24 +++++++++++++++++++++++-
 1 files changed, 23 insertions(+), 1 deletions(-)

diff --git a/standard-server/src/main/resources/mapper/TechniqueMapper.xml b/standard-server/src/main/resources/mapper/TechniqueMapper.xml
index 2fc35c2..cb02dc1 100644
--- a/standard-server/src/main/resources/mapper/TechniqueMapper.xml
+++ b/standard-server/src/main/resources/mapper/TechniqueMapper.xml
@@ -1,6 +1,22 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 <mapper namespace="com.yuanchu.mom.mapper.TechniqueMapper">
+    <!--鏍规嵁鎶�鏈寚鏍噄d鍒犻櫎-->
+    <update id="delByProId">
+        update mom_ocean.technique
+        set state=0
+        where technology_id = (select technology_id from mom_ocean.product where product.id = #{id})
+          and product_father = (select father from mom_ocean.product where product.id = #{id})
+          and product = (select name from mom_ocean.product where product.id = #{id})
+    </update>
+    <!--鏍规嵁鎶�鏈寚鏍噄d鎵归噺鍒犻櫎-->
+    <update id="delAll">
+        update mom_ocean.technique
+        set state=0
+        where technology_id in (select technology_id from mom_ocean.product where product.id in (${ids}))
+          and product_father in (select father from mom_ocean.product where product.id in (${ids}))
+          and product in (select name from mom_ocean.product where product.id in (${ids}))
+    </update>
     <!--鏍规嵁鍨嬪彿id鏌ヨ鎵�鏈夌増鏈�-->
     <select id="selectVerByTeq" resultType="java.lang.Integer">
         select distinct version
@@ -23,9 +39,15 @@
         <collection property="children" resultMap="threeMap" javaType="List"/>
     </resultMap>
     <resultMap id="threeMap" type="map">
-        <id property="tqid" column="tqid"/>
         <result property="device" column="device"/>
+        <collection property="children" resultMap="fourMap" javaType="List"/>
+    </resultMap>
+    <resultMap id="fourMap" type="map">
         <result property="productFather" column="product_father"/>
+        <collection property="children" resultMap="fiveMap" javaType="List"/>
+    </resultMap>
+    <resultMap id="fiveMap" type="map">
+        <id property="tqid" column="tqid"/>
         <result property="product" column="product"/>
         <result property="unit" column="unit"/>
     </resultMap>

--
Gitblit v1.9.3