From 620a3be8596434a8796469a8213a0066c836a1d4 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期四, 28 四月 2022 18:22:43 +0800
Subject: [PATCH] fix

---
 dao/src/main/resources/mapper/MonitorMapper.xml |   33 +++------------------------------
 1 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/dao/src/main/resources/mapper/MonitorMapper.xml b/dao/src/main/resources/mapper/MonitorMapper.xml
index 0273808..ee82805 100644
--- a/dao/src/main/resources/mapper/MonitorMapper.xml
+++ b/dao/src/main/resources/mapper/MonitorMapper.xml
@@ -10,41 +10,14 @@
         <result property="devicesCode" column="devices_code" jdbcType="VARCHAR"/>
         <result property="deviceName" column="device_name" jdbcType="VARCHAR"/>
         <result property="deviceType" column="device_type" jdbcType="VARCHAR"/>
-        <result property="equipmentStatus" column="equipment_status" jdbcType="INTEGER"/>
+        <result property="equipmentState" column="equipment_state" jdbcType="INTEGER"/>
         <result property="isEncrypt" column="is_encrypt" jdbcType="INTEGER"/>
-        <result property="workState" column="work_state" jdbcType="INTEGER"/>
         <result property="bindingState" column="binding_state" jdbcType="INTEGER"/>
         <result property="note" column="note" jdbcType="VARCHAR"/>
         <result property="addTime" column="add_time" jdbcType="TIMESTAMP"/>
         <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
         <result property="netAddress" column="net_address" jdbcType="VARCHAR"/>
     </resultMap>
-    <select id="listMonitorByKeyword" resultType="com.sandu.ximon.dao.domain.Monitor">
-        SELECT    * FROM   (SELECT    * FROM    (SELECT    * FROM    monitor AS table1
-              WHERE device_serial  LIKE CONCAT(CONCAT('%', #{keyword}), '%')
-              ) AS table2
-         WHERE equipment_status = #{equipmentState1}
-         OR equipment_status = #{equipmentState2}) AS table3
-        WHERE binding_state = #{bindingState1} OR binding_state = #{bindingState2};
-    </select>
-    <select id="listMonitorByKeyword1" resultType="com.sandu.ximon.dao.domain.Monitor">
-        SELECT
-	        t1.*, t2.pole_id,
-	        t3.pole_name
-        FROM
-	        monitor t1
-        LEFT JOIN pole_binding t2 ON t1.device_serial = t2.device_code
-        AND t2.device_type = 7
-        LEFT JOIN pole t3 ON t3.id = t2.pole_id
-        WHERE
-	        t1.device_serial  LIKE CONCAT(CONCAT('%', #{keyword}), '%')
-        OR t2.pole_id LIKE CONCAT(CONCAT('%', #{keyword}), '%')
-        OR t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
-        AND binding_state = #{bindingState1}
-        OR binding_state = #{bindingState2}
-        ORDER BY
-	        t1.id DESC
-    </select>
 
     <select id="listMonitorByIds" resultType="com.sandu.ximon.dao.bo.MonitorBo">
         SELECT
@@ -70,9 +43,9 @@
             </if>
         </where>
     </select>
-    <select id="listMonitorDeviceSerial" resultType="java.lang.String">
+    <select id="listMonitorDeviceSerial1" resultType="com.sandu.ximon.dao.domain.Monitor">
         SELECT
-        device_serial
+        t1.*
         FROM
         monitor t1
         LEFT JOIN pole_binding t2 ON t1.device_serial = t2.device_code

--
Gitblit v1.9.3