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/C3mChargingMapper.xml |   37 ++++++++++++++++++++++++++++++++++++-
 1 files changed, 36 insertions(+), 1 deletions(-)

diff --git a/dao/src/main/resources/mapper/C3mChargingMapper.xml b/dao/src/main/resources/mapper/C3mChargingMapper.xml
index a85b64e..8a6686b 100644
--- a/dao/src/main/resources/mapper/C3mChargingMapper.xml
+++ b/dao/src/main/resources/mapper/C3mChargingMapper.xml
@@ -11,12 +11,47 @@
             <result property="c3Mac" column="c3_mac" jdbcType="VARCHAR"/>
             <result property="statusBit" column="status_bit" jdbcType="INTEGER"/>
             <result property="deviceTemperature" column="device_temperature" jdbcType="VARCHAR"/>
+            <result property="poleDevicesCode" column="pole_devices_code" jdbcType="VARCHAR"/>
             <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
     </resultMap>
 
     <sql id="Base_Column_List">
         c3_id,mcu_udid,c3_name,
         c3_mac,status_bit,device_temperature,
-        update_time
+        pole_devices_code,update_time
     </sql>
+
+    <select id="getAllByC3Mac" resultType="com.sandu.ximon.dao.domain.C3mCharging">
+        select *
+        from c3m_charging
+        where c3_mac = #{c3Mac}
+    </select>
+    <select id="listC3mChargingDto" resultType="com.sandu.ximon.dao.bo.C3ChargingBo">
+        SELECT t1.*, t3.pole_code,
+        t3.pole_name
+        FROM c3m_charging t1
+        LEFT JOIN pole_binding t2 ON t1.mcu_udid = t2.device_code
+        AND t2.device_type = 8
+        LEFT JOIN pole t3 ON t3.id = t2.pole_id
+        <where>
+            <if test="keyword != null and keyword != ''">
+                AND (t1.c3_name LIKE CONCAT(CONCAT('%', #{keyword}), '%') OR (t3.pole_name LIKE CONCAT(CONCAT('%', #{keyword}), '%')))
+            </if>
+        </where>
+    </select>
 </mapper>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

--
Gitblit v1.9.3