From 1259287e119a21304ea175e83d9ff8fc12a19cf6 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Tue, 18 Feb 2025 12:03:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E5=85=B3=E9=94=AE=E5=AD=97=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1359317758869504]资源清单关键字搜索结果不对 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1359317758869504 --- .../mapper/resourcecenter/ResourceMapper.xml | 33 ++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceMapper.xml b/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceMapper.xml index c29d5a17..e1fb41c7 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceMapper.xml +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceMapper.xml @@ -389,6 +389,9 @@ along with this program. If not, see .--> resultType="java.lang.Long"> SELECT m.`id` FROM ( SELECT DISTINCT a.`id` + + ,count(distinct fw.word) as match_count + , a.`name` @@ -451,17 +454,25 @@ along with this program. If not, see .--> --> - - - ORDER BY LENGTH(a.`name`) - - - ORDER BY LENGTH(a.`ip`) - - - ORDER BY a.`id` - - + + group by a.id + + + + match_count DESC, + + + + LENGTH(a.`name`) + + + LENGTH(a.`ip`) + + + a.`id` + + + LIMIT #{startNum}, #{pageSize} ) m -- Gitee From f839fd2e2eff4998a65478729291a2b8529edfe5 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Wed, 19 Feb 2025 15:55:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E5=85=B3=E9=94=AE=E5=AD=97=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B8=8D=E5=AF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1359317758869504]资源清单关键字搜索结果不对 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1359317758869504 --- .../mapper/resourcecenter/ResourceMapper.xml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceMapper.xml b/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceMapper.xml index e1fb41c7..acd8afab 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceMapper.xml +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceMapper.xml @@ -392,12 +392,6 @@ along with this program. If not, see .--> ,count(distinct fw.word) as match_count - - , a.`name` - - - , a.`ip` - FROM @{DATA_SCHEMA}.`scence_ipobject_detail` a LEFT JOIN `cmdb_resourcecenter_resource_account` b ON b.`resource_id` = a.`id` @@ -461,17 +455,7 @@ along with this program. If not, see .--> match_count DESC, - - - LENGTH(a.`name`) - - - LENGTH(a.`ip`) - - - a.`id` - - + a.`id` DESC LIMIT #{startNum}, #{pageSize} ) m -- Gitee