From 600fd0d3b4a676fa071743196fe0f8407d57c491 Mon Sep 17 00:00:00 2001
From: dengzedong <dengzedong@email>
Date: 星期一, 14 十月 2024 09:33:01 +0800
Subject: [PATCH] return utils.reverseResult(this.result); 对模型的返回结果进行处理

---
 iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/ind/IndItemDao.xml |   76 +++++++------------------------------
 1 files changed, 15 insertions(+), 61 deletions(-)

diff --git a/iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/ind/IndItemDao.xml b/iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/ind/IndItemDao.xml
index b242970..556b99f 100644
--- a/iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/ind/IndItemDao.xml
+++ b/iailab-module-data/iailab-module-data-biz/src/main/resources/mapper/ind/IndItemDao.xml
@@ -1,74 +1,28 @@
 <?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.iailab.module.data.ind.dao.IndItemDao">
+<mapper namespace="com.iailab.module.data.ind.item.dao.IndItemDao">
 
-
-    <select id="getItemAtom" resultType="com.iailab.module.data.ind.dto.IndItemDTO">
-      SELECT
-        t1.item_no,
-        t1.item_name,
-        t1.item_type,
-        t1.coefficient,
-        t1.precision,
-        t1.time_range,
-        t1.time_granularity,
-        t2.data_source,
-        t2.query_sql
-        FROM t_ind_item t1
-        LEFT JOIN t_ind_item_atom t2 ON t2.item_id = t1.id
+    <select id="getItemList" resultType="com.iailab.module.data.ind.item.vo.IndItemRespVO">
+        select
+        t1.*,
+        t2.item_id as atomItemId
+        from t_ind_item t1
+        left join t_ind_item_atom t2 on t2.item_id = t1.id
         <where>
-            t1.item_type =  #{itemType}
-            <if test="isEnable != null">
-                AND t1.is_enable = #{isEnable}
+            <if test="params.itemNo != null and params.itemNo != ''">
+                and t1.item_no like concat('%', #{params.itemNo}, '%')
             </if>
-            <if test="timeGranularity != null and timeGranularity != ''">
-                AND t1.time_granularity = #{timeGranularity}
+            <if test="params.itemName != null and params.itemName != ''">
+                and t1.item_name like concat('%', #{params.itemName}, '%')
             </if>
-            <if test="itemNo != null and itemNo != ''">
-                AND t1.item_no = #{itemNo}
+            <if test="params.itemType != null and params.itemType != ''">
+                and t1.item_type = #{params.itemType}
             </if>
-            <if test="itemNos != null">
-                AND t1.item_no in
-                <foreach collection="itemNos" item="item" index="item" open="(" close=")" separator=",">
-                    #{item}
-                </foreach>
+            <if test="params.itemCategory != null and params.itemCategory != ''">
+                and t1.item_category = #{params.itemCategory}
             </if>
         </where>
     </select>
-    <select id="getItemCal" resultType="com.iailab.module.data.ind.dto.IndItemDTO">
-        SELECT
-        t1.item_no,
-        t1.item_name,
-        t1.item_type,
-        t1.coefficient,
-        t1.precision,
-        t1.time_range,
-        t1.time_granularity,
-        t2.expression
-        FROM t_ind_item t1
-        LEFT JOIN t_ind_item_cal t2 ON t2.item_id = t1.id
-        <where>
-            t1.item_type =  #{itemType}
-            <if test="isEnable != null">
-                AND t1.is_enable = #{isEnable}
-            </if>
-            <if test="timeGranularity != null and timeGranularity != ''">
-                AND t1.time_granularity = #{timeGranularity}
-            </if>
-            <if test="itemNo != null and itemNo != ''">
-                AND t1.item_no = #{itemNo}
-            </if>
-            <if test="itemNos != null">
-                AND t1.item_no in
-                <foreach collection="itemNos" item="item" index="item" open="(" close=")" separator=",">
-                    #{item}
-                </foreach>
-            </if>
-        </where>
-
-    </select>
-
-
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3