From e84a8f8d8a8b4d837fe589ab61eac9ecd418e05d Mon Sep 17 00:00:00 2001
From: 李林 <z1292839451@163.com>
Date: 星期五, 18 八月 2023 08:58:12 +0800
Subject: [PATCH] 8.18修改接口“根据销售单id修改详情信息”传入值(调整)

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

diff --git a/standard-server/src/main/resources/mapper/TechnologyTemplateMapper.xml b/standard-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
index 8acb3b4..01e5925 100644
--- a/standard-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
+++ b/standard-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
@@ -6,8 +6,24 @@
         from mom_ocean.technology_template
         where state = 1
     </select>
-    <select id="selTech" resultType="java.util.Map">
-        select name,
+
+    <resultMap id="selTech" type="com.yuanchu.mom.pojo.vo.TechnologyTemplateVo1">
+        <id property="father" column="father" jdbcType="VARCHAR"/>
+        <collection property="children" resultMap="TechnologyTemplateVo2ListMap"/>
+    </resultMap>
+
+    <resultMap id="TechnologyTemplateVo2ListMap" type="com.yuanchu.mom.pojo.vo.TechnologyTemplateVo2">
+        <id property="id" column="id" jdbcType="INTEGER"/>
+        <result property="name" column="name" jdbcType="VARCHAR"/>
+        <result property="element" column="element" jdbcType="VARCHAR"/>
+        <result property="base" column="base" jdbcType="VARCHAR"/>
+        <result property="control" column="control" jdbcType="VARCHAR"/>
+        <result property="note" column="note" jdbcType="VARCHAR"/>
+    </resultMap>
+    <select id="selTech" resultMap="selTech">
+        select id,
+        father,
+        name,
         element,
         base,
         control,
@@ -15,16 +31,16 @@
         from mom_ocean.technology_template t
         <where>
             state=1
-            <if test="type!=null">
+            <if test="type!=null and type!=''">
                 and type=#{type}
             </if>
-            <if test="element!=null">
-                and element=#{element}
+            <if test="element!=null and element!=''">
+                and element like concat('%',#{element},'%')
             </if>
-            <if test="father!=null">
-                and father=#{father}
+            <if test="father!=null and father!=''">
+                and father like concat('%',#{father},'%')
             </if>
         </where>
-        group by father
+
     </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3