From 9c349789633a27ec0cecc2499933012492807642 Mon Sep 17 00:00:00 2001 From: wangyimeng <421132955@qq.com> Date: Fri, 3 Mar 2023 20:59:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=A5=E8=AF=A2=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E9=80=9A=E9=81=93=E7=9B=AE=E5=BD=95=E6=97=B6=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java index 83f93343..9e2b1b7d 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java @@ -316,10 +316,10 @@ public interface DeviceChannelMapper { "select * " + "from device_channel " + "where deviceId=#{deviceId}" + - " and parentId = #{parentId} or left(channelId, #{parentId.length()}) = #{parentId} and length(channelId)=#{length} " + + " and parentId = #{parentId} or left(channelId, LENGTH(#{parentId})) = #{parentId} and length(channelId)=#{length} " + " and parentId = #{parentId} or length(channelId)=#{length} " + " and parentId = #{parentId} " + - " and parentId = #{parentId} or left(channelId, #{parentId.length()}) = #{parentId} " + + " and parentId = #{parentId} or left(channelId, LENGTH(#{parentId})) = #{parentId} " + " "}) List getChannelsWithCivilCodeAndLength(String deviceId, String parentId, Integer length);