From 68f6642d4d1fff10c6bd898d69dd7bff27adbc16 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期日, 24 九月 2023 15:18:29 +0800
Subject: [PATCH] 修改2.0   9.24

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

diff --git a/standard-server/src/main/resources/mapper/TechniqueMapper.xml b/standard-server/src/main/resources/mapper/TechniqueMapper.xml
index e6c0e9c..4132bae 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
@@ -49,7 +65,7 @@
         and specifications_id = #{specificationsId}
         and tq.version = #{version}
         <if test="message!=null and message!=''">
-            and device like concat('%',#{message},'%')
+            and name like concat('%',#{message},'%')
         </if>
     </select>
 
@@ -95,24 +111,25 @@
                                   and specifications_id = #{specificationsId})
     </select>
     <!--鏍规嵁宸ヨ壓璺嚎id鏌ヨ鎵�鏈夌増鏈�-->
-    <select id="selectVerByTeId" resultType="java.lang.Integer">
+   <!-- <select id="selectVerByTeId" resultType="java.lang.Integer">
         select distinct version
         from mom_ocean.technique
         where state = 1
           and technology_id = #{technologyId}
-    </select>
+    </select>-->
 
     <!--鏌ヨ璇ュ伐鑹轰笅鏈�鏂扮増鏈湪涓�涓楠岄」鐩笅鍙互浣跨敤鍝簺璁惧-->
-    <select id="selDevByVerTecIdFaNam" resultType="java.util.Map">
+    <!--<select id="selDevByVerTecIdFaNam" resultType="java.util.Map">
         select device.id, device
         from mom_ocean.technique
                  left join mom_ocean.device on name = device
         where technique.state = 1
+          and device.state = 1
           and technology_id = #{technologyId}
           and product_father = #{father}
           and product = #{name}
           and version = #{ver}
-    </select>
+    </select>-->
 
     <!--鏍规嵁id鏌ョ湅璇︽儏-->
     <select id="selTeqById" resultType="java.util.Map">

--
Gitblit v1.9.3