From ef270bd1855b5ce3f398c5df024840a498e33a8f Mon Sep 17 00:00:00 2001
From: MercuryZ <zdmisif@126.com>
Date: 星期四, 31 三月 2022 14:09:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
dao/src/main/resources/mapper/LightPoleHeelingMapper.xml | 44 ++++++++++++++++++++++++++++++++++----------
1 files changed, 34 insertions(+), 10 deletions(-)
diff --git a/dao/src/main/resources/mapper/LightPoleHeelingMapper.xml b/dao/src/main/resources/mapper/LightPoleHeelingMapper.xml
index fd9c08a..c0dd9aa 100644
--- a/dao/src/main/resources/mapper/LightPoleHeelingMapper.xml
+++ b/dao/src/main/resources/mapper/LightPoleHeelingMapper.xml
@@ -3,17 +3,41 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sandu.ximon.dao.mapper.LightPoleHeelingMapper">
+
<resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.LightPoleHeeling">
- <id property="id" column="id" jdbcType="BIGINT"/>
- <result property="userId" column="user_id" jdbcType="BIGINT"/>
- <result property="warningNumber" column="warning_number" jdbcType="VARCHAR"/>
- <result property="lightPoleId" column="light_pole_id" jdbcType="BIGINT"/>
- <result property="lightPoleName" column="light_pole_name" jdbcType="VARCHAR"/>
- <result property="warningLevel" column="warning_level" jdbcType="VARCHAR"/>
- <result property="theXAxis" column="the_x_axis" jdbcType="INTEGER"/>
- <result property="theYAxis" column="the_y_axis" jdbcType="INTEGER"/>
- <result property="theZAxis" column="the_z_axis" jdbcType="INTEGER"/>
+ <id property="warningNumber" column="warning_number" jdbcType="BIGINT"/>
+ <result property="mac" column="mac" jdbcType="VARCHAR"/>
+ <result property="warningLevel" column="warning_level" jdbcType="INTEGER"/>
+ <result property="theXAxis" column="the_x_axis" jdbcType="DOUBLE"/>
+ <result property="theYAxis" column="the_y_axis" jdbcType="DOUBLE"/>
+ <result property="theZAxis" column="the_z_axis" jdbcType="DOUBLE"/>
<result property="processingState" column="processing_state" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
</resultMap>
-</mapper>
\ No newline at end of file
+
+ <sql id="Base_Column_List">
+ warning_number,mac,warning_level,
+ the_x_axis,the_y_axis,the_z_axis,
+ processing_state,create_time
+ </sql>
+
+ <select id="listLightPoleHeeling" resultType="com.sandu.ximon.dao.domain.LightPoleHeeling">
+ SELECT t1.*, t3.pole_code,
+ t3.pole_name
+ FROM light_pole_heeling t1
+ LEFT JOIN pole_binding t2 ON t1.mac = t2.device_code
+ AND t2.device_type = 8
+ LEFT JOIN pole t3 ON t3.id = t2.pole_id
+ <where>
+ (t1.warning_level = 1 OR t1.warning_level = 2)
+ <if test="keyword != null and keyword != ''">
+ AND (t1.warning_number LIKE CONCAT(CONCAT('%', #{keyword}), '%') OR (t3.pole_name LIKE
+ CONCAT(CONCAT('%', #{keyword}), '%'))OR (t3.pole_code LIKE CONCAT(CONCAT('%', #{keyword}), '%')))
+ </if>
+ <if test="processingState != null and processingState != 2">
+ AND t1.processing_state = #{processingState}
+ </if>
+ </where>
+
+ </select>
+</mapper>
--
Gitblit v1.9.3