"DELETE FROM platform_gb_channel WHERE deviceId='${deviceId}' "+
"DELETE FROM platform_gb_channel WHERE deviceChannelId in "+
"( select temp.deviceChannelId from "+
"(select pgc.deviceChannelId from platform_gb_channel pgc "+
"left join device_channel dc on dc.id = pgc.deviceChannelId where dc.deviceId =#{deviceId} "+
") temp)"+
"</script>")
intdelChannelForDeviceId(StringdeviceId);
@ -50,8 +54,7 @@ public interface PlatformChannelMapper {
"</script>")
intcleanChannelForGB(StringplatformId);
@Select("SELECT * FROM device_channel WHERE deviceId = (SELECT deviceId FROM platform_gb_channel WHERE "+
"platformId='${platformId}' AND channelId='${channelId}' ) AND channelId='${channelId}'")
@Select("SELECT dc.* FROM platform_gb_channel pgc left join device_channel dc on dc.id = pgc.deviceChannelId WHERE dc.channelId='${channelId}' and pgc.platformId='${platformId}'")