From 33ecbd69aca2ccc58d47f467f3f7266b37fa9dfc Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期五, 27 五月 2022 18:44:38 +0800
Subject: [PATCH] fix

---
 dao/src/main/resources/mapper/LedPlayerEntityMapper.xml |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/dao/src/main/resources/mapper/LedPlayerEntityMapper.xml b/dao/src/main/resources/mapper/LedPlayerEntityMapper.xml
index 3e43ce2..ca6a50c 100644
--- a/dao/src/main/resources/mapper/LedPlayerEntityMapper.xml
+++ b/dao/src/main/resources/mapper/LedPlayerEntityMapper.xml
@@ -43,4 +43,27 @@
             </if>
         </where>
     </select>
+
+    <select id="ledPlayerEntityListOnBinding" resultType="com.sandu.ximon.dao.domain.LedPlayerEntity">
+        SELECT
+        t1.*, t2.pole_id,
+        t3.pole_name, t3.id
+        FROM
+        led t1
+        LEFT JOIN pole_binding t2 ON t1.sn = t2.device_code
+        AND t2.device_type = 1
+        LEFT JOIN pole t3 ON t3.id = t2.pole_id
+        <where>
+            <if test="keyword != null and keyword != ''">
+                AND t1.name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+                OR t1.player_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+                OR t1.sn LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+                OR t1.id LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+            </if>
+            <if test="userid != null">
+                AND (t3.user_id = #{userid} OR t3.client_id = #{userid})
+            </if>
+        </where>
+    </select>
+
 </mapper>

--
Gitblit v1.9.3