From feac6e0c2db4e60d55417fde1971a0bc6d703566 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期五, 27 五月 2022 15:58:28 +0800
Subject: [PATCH] fix
---
dao/src/main/resources/mapper/PoleMapper.xml | 36 ++++++++++++++++++++++++++++++++++++
1 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/dao/src/main/resources/mapper/PoleMapper.xml b/dao/src/main/resources/mapper/PoleMapper.xml
index 5945bd5..cabb7c5 100644
--- a/dao/src/main/resources/mapper/PoleMapper.xml
+++ b/dao/src/main/resources/mapper/PoleMapper.xml
@@ -38,4 +38,40 @@
SET device_code=null
WHERE id = #{id}
</update>
+ <select id="queryPoleOnLineStatesList" resultType="com.sandu.ximon.dao.domain.Pole">
+ SELECT
+ t1.*
+ FROM
+ pole t1
+ LEFT JOIN pole_group_relation t2 ON t1.id = t2.pole_id
+ LEFT JOIN pole_group t3 ON t3.group_id = t2.pole_group_id
+ <where>
+ <if test="userid != null">
+ AND (t1.user_id = #{userid} OR t1.client_id = #{userid})
+ </if>
+ <if test="keyword != null and keyword != ''">
+ AND ( t1.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+ OR t1.device_code LIKE CONCAT(CONCAT('%', #{keyword}), '%'))
+ </if>
+ <if test="isTrue != null and isTrue == 1">
+ AND t1.device_type = -1
+ </if>
+ <if test="isTrue != null and isTrue == 0">
+ AND t1.device_type != -1
+ </if>
+ <if test="groupid != null">
+ AND t3.group_id = #{groupid}
+ </if>
+ <if test="bingStates != null and bingStates == 0 ">
+ AND t1.user_id != -1
+ </if>
+ <if test="bingStates != null and bingStates == 1 ">
+ AND t1.user_id = -1
+ </if>
+ </where>
+ GROUP BY t1.id
+ <if test="orderBy != null">
+ ORDER BY ${orderBy}
+ </if>
+ </select>
</mapper>
--
Gitblit v1.9.3