From a1b0e5c618b9cd1c2521be14beec70321232ec1d Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期一, 11 十二月 2023 14:27:55 +0800
Subject: [PATCH] 删除注释

---
 ycl-platform/src/main/resources/mapper/dict/DataDictionaryMapper.xml |   93 ++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 84 insertions(+), 9 deletions(-)

diff --git a/ycl-platform/src/main/resources/mapper/dict/DataDictionaryMapper.xml b/ycl-platform/src/main/resources/mapper/dict/DataDictionaryMapper.xml
index 355abb6..f288084 100644
--- a/ycl-platform/src/main/resources/mapper/dict/DataDictionaryMapper.xml
+++ b/ycl-platform/src/main/resources/mapper/dict/DataDictionaryMapper.xml
@@ -4,19 +4,94 @@
 
     <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
     <resultMap id="BaseResultMap" type="com.ycl.entity.dict.DataDictionary">
-        <id column="id" property="id" />
-        <result column="name" property="name" />
-        <result column="code" property="code" />
-        <result column="type_name" property="typeName" />
-        <result column="type_code" property="typeCode" />
-        <result column="parent_id" property="parentId" />
-        <result column="level" property="level" />
-        <result column="remark" property="remark" />
+        <id column="id" property="id"/>
+        <result column="name" property="name"/>
+        <result column="code" property="code"/>
+        <result column="type_name" property="typeName"/>
+        <result column="type_code" property="typeCode"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="level" property="level"/>
+        <result column="remark" property="remark"/>
     </resultMap>
 
     <!-- 閫氱敤鏌ヨ缁撴灉鍒� -->
     <sql id="Base_Column_List">
-        id, name, code, type_name,type_code,parent_id,level,remark
+        id
+        , name, code, type_name,type_code,parent_id,level,remark
     </sql>
 
+    <resultMap id="settingsResultMap" type="com.ycl.vo.IllegalBuildingSettingVO">
+        <id column="number" property="number"/>
+        <result column="type" property="type"/>
+        <result column="typeFirst" property="typeFirst"/>
+        <result column="typeSecond" property="typeSecond"/>
+        <result column="typeThird" property="typeThird"/>
+    </resultMap>
+
+    <resultMap id="VoMap" type="com.ycl.vo.dict.DataDictionaryVo" extends="BaseResultMap">
+        <collection property="children" javaType="ArrayList" ofType="com.ycl.entity.dict.DataDictionary">
+            <result column="c_id" property="id"/>
+            <result column="c_name" property="name"/>
+            <result column="c_code" property="code"/>
+            <result column="c_level" property="level"/>
+            <result column="c_remark" property="remark"/>
+        </collection>
+    </resultMap>
+
+    <select id="listDataDictionaryPage" resultType="com.ycl.vo.IllegalBuildingSettingVO">
+        SELECT
+        d1.id AS number,
+        d1.`name` AS type,
+        d2.`name` AS typeFirst
+        FROM
+        `ums_data_dictionary` AS d1
+        JOIN ums_data_dictionary AS d2 ON d1.parent_id = d2.id
+        <where>
+            d1.`level` = '2'
+            AND d1.type_code = '06'
+            <if test="keyWord !=null and keyWord !=''">
+                AND (d1.`name` LIKE '%${keyWord}%'
+                or d2.`name` LIKE '%${keyWord}%')
+                or d2.`name` LIKE '%${keyWord}%')
+            </if>
+
+        </where>
+    </select>
+
+    <select id="listViolationPage" resultType="com.ycl.vo.ViolationSettingVO">
+        SELECT
+        d1.id AS number,
+        d1.`name` AS type,
+        d2.`name` AS typeFirst,
+        d3.`name` AS typeSecond,
+        d4.`name` AS typeThird
+        FROM `ums_data_dictionary` AS d1
+        LEFT JOIN ums_data_dictionary AS d2 ON d1.parent_id = d2.id
+        LEFT JOIN ums_data_dictionary AS d3 ON d2.parent_id = d3.id
+        LEFT JOIN ums_data_dictionary AS d4 ON d3.parent_id = d4.id
+        <where>
+            d1.`level` = '4'
+            AND d1.type_code = '01'
+            <if test="keyWord !=null and keyWord !=''">
+                AND (d1.`name` LIKE '%${keyWord}%'
+                or d2.`name` LIKE '%${keyWord}%'
+                or d3.`name` LIKE '%${keyWord}%'
+                or d4.`name` LIKE '%${keyWord}%'
+                )
+            </if>
+
+        </where>
+
+        ORDER BY d1.parent_id,d2.parent_id,d3.parent_id,d4.parent_id
+    </select>
+
+    <select id="queryTreeType" resultMap="VoMap">
+        SELECT p.*, c.id c_id, c.`name` c_name, c.`code` c_code, c.`level` c_level, c.remark c_remark
+        FROM ums_data_dictionary p
+                 LEFT JOIN ums_data_dictionary c on p.id = c.parent_id
+        WHERE p.`type_code` = #{typeCode}
+          and p.`level` = #{level}
+        ORDER BY p.id, c.id
+    </select>
+
 </mapper>

--
Gitblit v1.8.0