Commit 654599b6598d050e55522beffcdfd8eaccbefd12
1 parent
47e5d2b0
修复通道重命名后无法被检索到
Showing
1 changed file
with
5 additions
and
1 deletions
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
| ... | ... | @@ -107,7 +107,11 @@ public interface DeviceChannelMapper { |
| 107 | 107 | "wvp_device_channel dc " + |
| 108 | 108 | "WHERE " + |
| 109 | 109 | "dc.device_id = #{deviceId} " + |
| 110 | -" <if test='query != null'> AND (dc.channel_id LIKE concat('%',#{query},'%') OR dc.name LIKE concat('%',#{query},'%') OR dc.name LIKE concat('%',#{query},'%'))</if> " + | |
| 110 | + " <if test='query != null'> AND (" + | |
| 111 | + "dc.channel_id LIKE concat('%',#{query},'%') " + | |
| 112 | + "OR dc.name LIKE concat('%',#{query},'%') " + | |
| 113 | + "OR dc.custom_name LIKE concat('%',#{query},'%')" + | |
| 114 | + ")</if> " + | |
| 111 | 115 | " <if test='parentChannelId != null'> AND (dc.parent_id=#{parentChannelId} OR dc.civil_code = #{parentChannelId}) </if> " + |
| 112 | 116 | " <if test='online == true' > AND dc.status= true</if>" + |
| 113 | 117 | " <if test='online == false' > AND dc.status= false</if>" + | ... | ... |