Ver Fonte

mqtt指令发布

李进 há 2 anos atrás
pai
commit
2513e1e3fa

+ 31 - 2
device-api-service/src/main/resources/mapper/DeviceInfoMapper.xml

@@ -44,9 +44,15 @@
         left join sys_region sr on(info.district_id = sr.id)
         where
         1 = 1
-        <if test="queryPage.showStatus != null and queryPage.showStatus != ''">
+        <if test="queryPage.showStatus != null">
             and info.show_status = #{queryPage.showStatus}
         </if>
+        <if test="queryPage.deviceId != null">
+            and info.device_id = #{queryPage.deviceId}
+        </if>
+        <if test="queryPage.deviceName != null and queryPage.deviceName != ''">
+            and LOCATE(#{queryPage.deviceName}, sysinfo.device_name) > 0
+        </if>
         <if test="queryPage.no != null and queryPage.no != ''">
             and (
                 LOCATE(#{queryPage.no}, info.device_id) > 0 or LOCATE(#{queryPage.no}, info.merc_device_code) > 0 or LOCATE(#{queryPage.no}, sysinfo.device_sn) > 0
@@ -64,11 +70,35 @@
         <if test="queryPage.deviceType != null">
             and info.device_type = #{queryPage.deviceType}
         </if>
+        <if test="queryPage.mercDeviceCode != null and queryPage.mercDeviceCode != ''">
+            and info.merc_device_code = #{queryPage.mercDeviceCode}
+        </if>
+        <if test="queryPage.mercCode != null and queryPage.mercCode != ''">
+            and info.merc_code = #{queryPage.mercCode}
+        </if>
+        <if test="queryPage.mercId != null">
+            and info.merc_id = #{queryPage.mercId}
+        </if>
         <if test="queryPage.merc != null and queryPage.merc != ''">
             and (
                 info.merc_id = #{queryPage.merc} or info.merc_code = #{queryPage.merc} or LOCATE(#{queryPage.merc}, mr.name) > 0
             )
         </if>
+        <if test="queryPage.placeId != null">
+            and info.place_id = #{queryPage.placeId}
+        </if>
+        <if test="queryPage.placeLineId != null">
+            and info.place_line_id = #{queryPage.placeLineId}
+        </if>
+        <if test="queryPage.districtId != null">
+            and info.district_id = #{queryPage.districtId}
+        </if>
+        <if test="queryPage.activeState != null">
+            and info.active_state = #{queryPage.activeState}
+        </if>
+        <if test="queryPage.busyState != null">
+            and info.busy_state = #{queryPage.busyState}
+        </if>
         <if test="queryPage.appUpmVersion != null and queryPage.appUpmVersion != ''">
             and sysinfo.app_upm_version = #{appUpmVersion}
         </if>
@@ -86,7 +116,6 @@
                 HAVING `m` &lt;= #{queryPage.nearby}
             </if>
         </if>
-
         <choose>
             <when test="queryPage.lon != null and queryPage.lon != ''">
                 order by `m` asc