From 7b09f233bde70508f6db7e08e983e9a2c4bb3e99 Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期五, 11 八月 2023 17:50:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

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

diff --git a/standard-server/src/main/resources/mapper/TechnologyTemplateMapper.xml b/standard-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
new file mode 100644
index 0000000..01e5925
--- /dev/null
+++ b/standard-server/src/main/resources/mapper/TechnologyTemplateMapper.xml
@@ -0,0 +1,46 @@
+<?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.TechnologyTemplateMapper">
+    <select id="seleType" resultType="java.lang.Integer">
+        select distinct type
+        from mom_ocean.technology_template
+        where state = 1
+    </select>
+
+    <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,
+        note
+        from mom_ocean.technology_template t
+        <where>
+            state=1
+            <if test="type!=null and type!=''">
+                and type=#{type}
+            </if>
+            <if test="element!=null and element!=''">
+                and element like concat('%',#{element},'%')
+            </if>
+            <if test="father!=null and father!=''">
+                and father like concat('%',#{father},'%')
+            </if>
+        </where>
+
+    </select>
+</mapper>
\ No newline at end of file

--
Gitblit v1.9.3