From f2dfd5e6fbbb9c4e96e91c86be0bb6f7a44d87c3 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期一, 18 四月 2022 11:56:21 +0800
Subject: [PATCH] LED屏列表
---
dao/src/main/resources/mapper/PoleLightemitEntityMapper.xml | 49 +++++++++++++++++++++++++++++++++++--------------
1 files changed, 35 insertions(+), 14 deletions(-)
diff --git a/dao/src/main/resources/mapper/PoleLightemitEntityMapper.xml b/dao/src/main/resources/mapper/PoleLightemitEntityMapper.xml
index c7147d0..f736cc0 100644
--- a/dao/src/main/resources/mapper/PoleLightemitEntityMapper.xml
+++ b/dao/src/main/resources/mapper/PoleLightemitEntityMapper.xml
@@ -5,20 +5,20 @@
<mapper namespace="com.sandu.ximon.dao.mapper.PoleLightemitEntityMapper">
<resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.PoleLightemitEntity">
- <id property="lightemitId" column="lightemit_id" jdbcType="BIGINT"/>
- <result property="lightemitName" column="lightemit_name" jdbcType="VARCHAR"/>
- <result property="lightemitControlCode" column="lightemit_control_code" jdbcType="VARCHAR"/>
- <result property="url" column="url" jdbcType="VARCHAR"/>
- <result property="playTime" column="play_time" jdbcType="INTEGER"/>
- <result property="addTime" column="add_time" jdbcType="TIMESTAMP"/>
- <result property="requestBody" column="request_body" jdbcType="VARCHAR"/>
- <result property="playerSetting" column="player_setting" jdbcType="TINYINT"/>
- <result property="status" column="status" jdbcType="TINYINT"/>
- <result property="remark" column="remark" jdbcType="VARCHAR"/>
- <result property="createUserId" column="create_user_id" jdbcType="BIGINT"/>
- <result property="clientId" column="client_id" jdbcType="BIGINT"/>
- <result property="userId" column="user_id" jdbcType="BIGINT"/>
- <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+ <id property="lightemitId" column="lightemit_id" jdbcType="BIGINT"/>
+ <result property="lightemitName" column="lightemit_name" jdbcType="VARCHAR"/>
+ <result property="lightemitControlCode" column="lightemit_control_code" jdbcType="VARCHAR"/>
+ <result property="url" column="url" jdbcType="VARCHAR"/>
+ <result property="playTime" column="play_time" jdbcType="INTEGER"/>
+ <result property="addTime" column="add_time" jdbcType="TIMESTAMP"/>
+ <result property="requestBody" column="request_body" jdbcType="VARCHAR"/>
+ <result property="playerSetting" column="player_setting" jdbcType="TINYINT"/>
+ <result property="status" column="status" jdbcType="TINYINT"/>
+ <result property="remark" column="remark" jdbcType="VARCHAR"/>
+ <result property="createUserId" column="create_user_id" jdbcType="BIGINT"/>
+ <result property="clientId" column="client_id" jdbcType="BIGINT"/>
+ <result property="userId" column="user_id" jdbcType="BIGINT"/>
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
@@ -33,4 +33,25 @@
SET request_body = #{postBody}
WHERE lightemit_control_code = #{ledCode}
</update>
+
+ <select id="listLed" resultType="com.sandu.ximon.dao.domain.PoleLightemitEntity">
+ SELECT
+ t1.*, t2.pole_id,
+ t3.pole_name as streetlight_name , t3.id
+ FROM
+ pole_lightemit t1
+ LEFT JOIN pole_binding t2 ON t1.lightemit_control_code = 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.lightemit_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+ OR t1.lightemit_control_code LIKE CONCAT(CONCAT('%', #{keyword}), '%')
+ OR t1.lightemit_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