From 43a8e42a9858fce39e8c67da22f3a1ab9618e650 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Mon, 4 Aug 2025 17:38:55 +0800 Subject: [PATCH 01/10] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B0=86=E6=B6=89?= =?UTF-8?q?=E5=8F=8Ascence=5Fipobject=5Fdetail=E8=A7=86=E5=9B=BE=E7=9A=84S?= =?UTF-8?q?QL=E8=AF=AD=E5=8F=A5=E6=94=B9=E6=88=90=E5=8A=A8=E6=80=81sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1469827334504448]将涉及scence_ipobject_detail视图的SQL语句改成动态sql http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1469827334504448 --- .../framework/cmdb/crossover/IResourceCrossoverMapper.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java index 5b8e913..9fc54b2 100644 --- a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java @@ -27,7 +27,6 @@ import neatlogic.framework.crossover.ICrossoverService; import org.apache.ibatis.annotations.Param; import java.util.List; -import java.util.Set; public interface IResourceCrossoverMapper extends ICrossoverService { @Deprecated @@ -73,7 +72,7 @@ public interface IResourceCrossoverMapper extends ICrossoverService { List getResourceListByResourceVoList(@Param("resourceList") List resourceList,@Param("searchVo") ResourceSearchVo searchVo); - Set getResourceTypeIdListByAppSystemIdAndModuleIdAndEnvIdAndInspectStatusList(ResourceSearchVo searchVo); +// Set getResourceTypeIdListByAppSystemIdAndModuleIdAndEnvIdAndInspectStatusList(ResourceSearchVo searchVo); List getResourceIdListByAppSystemIdAndModuleIdAndEnvId(ResourceVo resourceVo); /** -- Gitee From 22c1e0b43ab7986a87b9a9504660c53a603e180d Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Thu, 7 Aug 2025 19:01:34 +0800 Subject: [PATCH 02/10] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B0=86=E6=B6=89?= =?UTF-8?q?=E5=8F=8Ascence=5Fipobject=5Fdetail=E8=A7=86=E5=9B=BE=E7=9A=84S?= =?UTF-8?q?QL=E8=AF=AD=E5=8F=A5=E6=94=B9=E6=88=90=E5=8A=A8=E6=80=81sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1469827334504448]将涉及scence_ipobject_detail视图的SQL语句改成动态sql http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1469827334504448 --- .../framework/cmdb/crossover/IResourceCrossoverMapper.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java index 9fc54b2..2f7610c 100644 --- a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java @@ -70,6 +70,7 @@ public interface IResourceCrossoverMapper extends ICrossoverService { List getAppModuleListByIdListSimple(@Param("idList") List idList, @Param("needOrder") boolean needOrder); + // 该SQL语句可以使用 getResourceListByIpAndPortAndName 代替 List getResourceListByResourceVoList(@Param("resourceList") List resourceList,@Param("searchVo") ResourceSearchVo searchVo); // Set getResourceTypeIdListByAppSystemIdAndModuleIdAndEnvIdAndInspectStatusList(ResourceSearchVo searchVo); -- Gitee From 005232f6bb5c2f9768c846777f6aa76061b9afb1 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Fri, 8 Aug 2025 18:47:16 +0800 Subject: [PATCH 03/10] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B0=86=E6=B6=89?= =?UTF-8?q?=E5=8F=8Ascence=5Fipobject=5Fdetail=E8=A7=86=E5=9B=BE=E7=9A=84S?= =?UTF-8?q?QL=E8=AF=AD=E5=8F=A5=E6=94=B9=E6=88=90=E5=8A=A8=E6=80=81sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1469827334504448]将涉及scence_ipobject_detail视图的SQL语句改成动态sql http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1469827334504448 --- ...esourceCenterResourceCrossoverService.java | 21 +++++++++++++++++++ .../crossover/IResourceCrossoverMapper.java | 2 ++ .../config/ResourceQueryCriteriaVo.java | 10 +++++++++ 3 files changed, 33 insertions(+) diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java index e360558..ddc1152 100644 --- a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java @@ -96,5 +96,26 @@ public interface IResourceCenterResourceCrossoverService extends ICrossoverServi */ String buildGetResourceListSql(List idList); + // InspectMapper + String buildGetInspectResourceListByIdListSql(List idList, List selectFieldNameList); + String buildGetInspectResourceListByIdListSql(List idList); + String buildGetInspectResourceCountSql(ResourceSearchVo searchVo); + String buildGetInspectResourceCountByIpKeywordSql(ResourceSearchVo searchVo); + String buildGetInspectResourceCountByNameKeywordSql(ResourceSearchVo searchVo); +// String buildgetInspectResourceIdListSql(); +// String buildgetInspectAutoexecJobNodeResourceCountSql(); +// String buildgetInspectAutoexecJobNodeResourceCountByIpKeywordSql(); +// String buildgetInspectAutoexecJobNodeResourceCountByNameKeywordSql(); +// String buildgetInspectAutoexecJobNodeResourceIdListSql(); +// String buildgetInspectResourceListByIdListAndJobIdSql(); + // InspectConfigFileMapper +// String buildgetInspectResourceCountSql(); +// String buildgetInspectResourceIdListSql(); +// String buildgetInspectResourceListByIdListSql(); +// String buildgetInspectConfigFilePathCountSql(); +// String buildgetInspectConfigFilePathIdListSql(); +// String buildgetInspectConfigFilePathListSql(); +// String buildgetInspectConfigFilePathListByJobIdSql(); + } diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java index 2f7610c..98051ce 100644 --- a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java @@ -34,6 +34,8 @@ public interface IResourceCrossoverMapper extends ICrossoverService { int getResourceCountBySql(String sql); + int getCountBySql(String sql); + int getResourceCountByDynamicCondition(@Param("searchVo") ResourceSearchVo searchVo, @Param("conditionSql") String conditionSql); @Deprecated List getResourceIdList(ResourceSearchVo searchVo); diff --git a/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/config/ResourceQueryCriteriaVo.java b/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/config/ResourceQueryCriteriaVo.java index 2412d89..128934d 100644 --- a/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/config/ResourceQueryCriteriaVo.java +++ b/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/config/ResourceQueryCriteriaVo.java @@ -26,6 +26,7 @@ import neatlogic.framework.restful.annotation.EntityField; import java.util.List; public class ResourceQueryCriteriaVo { + private String keyword; private List keywordList; @EntityField(name = "协议id列表", type = ApiParamType.JSONARRAY) private List protocolIdList; @@ -74,6 +75,7 @@ public class ResourceQueryCriteriaVo { } public ResourceQueryCriteriaVo(ResourceSearchVo searchVo) { + this.keyword = searchVo.getKeyword(); this.keywordList = searchVo.getKeywordList(); this.protocolIdList = searchVo.getProtocolIdList(); this.tagIdList = searchVo.getTagIdList(); @@ -98,6 +100,14 @@ public class ResourceQueryCriteriaVo { this.nameFieldAttrId = searchVo.getNameFieldAttrId(); } + public String getKeyword() { + return keyword; + } + + public void setKeyword(String keyword) { + this.keyword = keyword; + } + public List getKeywordList() { return keywordList; } -- Gitee From b1af2b371a87d3c64070f94012dc9a55cb93a80d Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Mon, 11 Aug 2025 17:10:57 +0800 Subject: [PATCH 04/10] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B0=86=E6=B6=89?= =?UTF-8?q?=E5=8F=8Ascence=5Fipobject=5Fdetail=E8=A7=86=E5=9B=BE=E7=9A=84S?= =?UTF-8?q?QL=E8=AF=AD=E5=8F=A5=E6=94=B9=E6=88=90=E5=8A=A8=E6=80=81sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1469827334504448]将涉及scence_ipobject_detail视图的SQL语句改成动态sql http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1469827334504448 --- ...esourceCenterResourceCrossoverService.java | 13 ++++---- .../config/ResourceQueryCriteriaVo.java | 33 ++++++++++++++++++- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java index ddc1152..63ee3bc 100644 --- a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java @@ -102,12 +102,13 @@ public interface IResourceCenterResourceCrossoverService extends ICrossoverServi String buildGetInspectResourceCountSql(ResourceSearchVo searchVo); String buildGetInspectResourceCountByIpKeywordSql(ResourceSearchVo searchVo); String buildGetInspectResourceCountByNameKeywordSql(ResourceSearchVo searchVo); -// String buildgetInspectResourceIdListSql(); -// String buildgetInspectAutoexecJobNodeResourceCountSql(); -// String buildgetInspectAutoexecJobNodeResourceCountByIpKeywordSql(); -// String buildgetInspectAutoexecJobNodeResourceCountByNameKeywordSql(); -// String buildgetInspectAutoexecJobNodeResourceIdListSql(); -// String buildgetInspectResourceListByIdListAndJobIdSql(); + String buildGetInspectResourceIdListSql(ResourceSearchVo searchVo); + String buildGetInspectAutoexecJobNodeResourceCountSql(ResourceSearchVo searchVo, Long jobId); + String buildGetInspectAutoexecJobNodeResourceCountByIpKeywordSql(ResourceSearchVo searchVo, Long jobId); + String buildGetInspectAutoexecJobNodeResourceCountByNameKeywordSql(ResourceSearchVo searchVo, Long jobId); + String buildGetInspectAutoexecJobNodeResourceIdListSql(ResourceSearchVo searchVo, Long jobId); + String buildGetInspectResourceListByIdListAndJobIdSql(List IdList, Long jobId); + String buildGetInspectResourceListByIdListAndJobIdSql(List IdList, Long jobId, List selectFieldNameList); // InspectConfigFileMapper // String buildgetInspectResourceCountSql(); // String buildgetInspectResourceIdListSql(); diff --git a/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/config/ResourceQueryCriteriaVo.java b/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/config/ResourceQueryCriteriaVo.java index 128934d..b2d216c 100644 --- a/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/config/ResourceQueryCriteriaVo.java +++ b/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/config/ResourceQueryCriteriaVo.java @@ -70,7 +70,12 @@ public class ResourceQueryCriteriaVo { private Long ipFieldAttrId; @EntityField(name = "name字段映射的属性ID", type = ApiParamType.LONG) private Long nameFieldAttrId; - + @EntityField(name = "以IP字段排序", type = ApiParamType.INTEGER) + private Integer isIpFieldSort; + @EntityField(name = "以name字段排序", type = ApiParamType.INTEGER) + private Integer isNameFieldSort; + @EntityField(name = "作业ID", type = ApiParamType.LONG) + private Long jobId; public ResourceQueryCriteriaVo() { } @@ -98,6 +103,8 @@ public class ResourceQueryCriteriaVo { this.authenticationInfo = searchVo.getAuthenticationInfo(); this.ipFieldAttrId = searchVo.getIpFieldAttrId(); this.nameFieldAttrId = searchVo.getNameFieldAttrId(); + this.isIpFieldSort = searchVo.getIsIpFieldSort(); + this.isNameFieldSort = searchVo.getIsNameFieldSort(); } public String getKeyword() { @@ -283,4 +290,28 @@ public class ResourceQueryCriteriaVo { public void setNameFieldAttrId(Long nameFieldAttrId) { this.nameFieldAttrId = nameFieldAttrId; } + + public Integer getIsIpFieldSort() { + return isIpFieldSort; + } + + public void setIsIpFieldSort(Integer isIpFieldSort) { + this.isIpFieldSort = isIpFieldSort; + } + + public Integer getIsNameFieldSort() { + return isNameFieldSort; + } + + public void setIsNameFieldSort(Integer isNameFieldSort) { + this.isNameFieldSort = isNameFieldSort; + } + + public Long getJobId() { + return jobId; + } + + public void setJobId(Long jobId) { + this.jobId = jobId; + } } -- Gitee From 19ae423987e627252e4cd851e8aac097369f85aa Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Mon, 11 Aug 2025 18:23:42 +0800 Subject: [PATCH 05/10] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B0=86=E6=B6=89?= =?UTF-8?q?=E5=8F=8Ascence=5Fipobject=5Fdetail=E8=A7=86=E5=9B=BE=E7=9A=84S?= =?UTF-8?q?QL=E8=AF=AD=E5=8F=A5=E6=94=B9=E6=88=90=E5=8A=A8=E6=80=81sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1469827334504448]将涉及scence_ipobject_detail视图的SQL语句改成动态sql http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1469827334504448 --- .../crossover/IResourceCenterResourceCrossoverService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java index 63ee3bc..4441659 100644 --- a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java @@ -110,9 +110,9 @@ public interface IResourceCenterResourceCrossoverService extends ICrossoverServi String buildGetInspectResourceListByIdListAndJobIdSql(List IdList, Long jobId); String buildGetInspectResourceListByIdListAndJobIdSql(List IdList, Long jobId, List selectFieldNameList); // InspectConfigFileMapper -// String buildgetInspectResourceCountSql(); -// String buildgetInspectResourceIdListSql(); -// String buildgetInspectResourceListByIdListSql(); +//r String buildgetInspectResourceCountSql(); + String buildGetInspectConfigFileResourceIdListSql(ResourceSearchVo searchVo); +//r String buildgetInspectResourceListByIdListSql(); // String buildgetInspectConfigFilePathCountSql(); // String buildgetInspectConfigFilePathIdListSql(); // String buildgetInspectConfigFilePathListSql(); -- Gitee From c89619ed71deba9e2572783a53ef675767a1102b Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Tue, 12 Aug 2025 19:12:09 +0800 Subject: [PATCH 06/10] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B0=86=E6=B6=89?= =?UTF-8?q?=E5=8F=8Ascence=5Fipobject=5Fdetail=E8=A7=86=E5=9B=BE=E7=9A=84S?= =?UTF-8?q?QL=E8=AF=AD=E5=8F=A5=E6=94=B9=E6=88=90=E5=8A=A8=E6=80=81sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1469827334504448]将涉及scence_ipobject_detail视图的SQL语句改成动态sql http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1469827334504448 --- .../IResourceCenterResourceCrossoverService.java | 8 ++++---- .../cmdb/dto/resourcecenter/ResourceSearchVo.java | 11 ++++++++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java index 4441659..123e173 100644 --- a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java @@ -113,10 +113,10 @@ public interface IResourceCenterResourceCrossoverService extends ICrossoverServi //r String buildgetInspectResourceCountSql(); String buildGetInspectConfigFileResourceIdListSql(ResourceSearchVo searchVo); //r String buildgetInspectResourceListByIdListSql(); -// String buildgetInspectConfigFilePathCountSql(); -// String buildgetInspectConfigFilePathIdListSql(); -// String buildgetInspectConfigFilePathListSql(); -// String buildgetInspectConfigFilePathListByJobIdSql(); + String buildGetInspectConfigFilePathCountSql(ResourceSearchVo searchVo); + String buildGetInspectConfigFilePathIdListSql(ResourceSearchVo searchVo); + String buildGetInspectConfigFilePathListSql(List idList); + String buildGetInspectConfigFilePathListByJobIdSql(Long jobId); } diff --git a/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/ResourceSearchVo.java b/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/ResourceSearchVo.java index 14db223..9f19e5e 100644 --- a/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/ResourceSearchVo.java +++ b/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/ResourceSearchVo.java @@ -111,7 +111,8 @@ public class ResourceSearchVo extends ConditionConfigVo { private String viewName; @EntityField(name = "输入节点列表", type = ApiParamType.JSONARRAY) private List inputNodeList; - + @EntityField(name = "时间范围", type = ApiParamType.JSONARRAY) + private List timeRange; public ResourceSearchVo() { } @@ -462,4 +463,12 @@ public class ResourceSearchVo extends ConditionConfigVo { public void setInputNodeList(List inputNodeList) { this.inputNodeList = inputNodeList; } + + public List getTimeRange() { + return timeRange; + } + + public void setTimeRange(List timeRange) { + this.timeRange = timeRange; + } } -- Gitee From b545132d8669e5c773aee35598c6a809d343539b Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Wed, 13 Aug 2025 14:22:17 +0800 Subject: [PATCH 07/10] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B0=86=E6=B6=89?= =?UTF-8?q?=E5=8F=8Ascence=5Fipobject=5Fdetail=E8=A7=86=E5=9B=BE=E7=9A=84S?= =?UTF-8?q?QL=E8=AF=AD=E5=8F=A5=E6=94=B9=E6=88=90=E5=8A=A8=E6=80=81sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1469827334504448]将涉及scence_ipobject_detail视图的SQL语句改成动态sql http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1469827334504448 --- ...esourceCenterResourceCrossoverService.java | 85 ++++++++++++++----- 1 file changed, 62 insertions(+), 23 deletions(-) diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java index 123e173..ea2f1ef 100644 --- a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java @@ -16,8 +16,10 @@ along with this program. If not, see .*/ package neatlogic.framework.cmdb.crossover; import com.alibaba.fastjson.JSONObject; +import neatlogic.framework.cmdb.dto.resourcecenter.AccountComponentVo; import neatlogic.framework.cmdb.dto.resourcecenter.AccountVo; import neatlogic.framework.cmdb.dto.resourcecenter.ResourceSearchVo; +import neatlogic.framework.cmdb.dto.resourcecenter.ResourceVo; import neatlogic.framework.cmdb.dto.tag.TagVo; import neatlogic.framework.crossover.ICrossoverService; @@ -67,55 +69,92 @@ public interface IResourceCenterResourceCrossoverService extends ICrossoverServi */ Map> getResourceTagByResourceIdList(List idList); - /** - * 生成SQL等效于{@link neatlogic.module.cmdb.dao.mapper.resourcecenter.ResourceMapper#getResourceIdList(neatlogic.framework.cmdb.dto.resourcecenter.ResourceSearchVo)} - * @param searchVo - * @return - */ String buildGetResourceIdListSql(ResourceSearchVo searchVo); - /** - * 生成SQL等效于{@link neatlogic.module.cmdb.dao.mapper.resourcecenter.ResourceMapper#getResourceCount(neatlogic.framework.cmdb.dto.resourcecenter.ResourceSearchVo)} - * @param searchVo - * @return - */ String buildGetResourceCountSql(ResourceSearchVo searchVo); - /** - * 生成SQL等效于{@link neatlogic.module.cmdb.dao.mapper.resourcecenter.ResourceMapper#getResourceListByIdList(java.util.List)} - * @param idList - * @param selectFieldNameList - * @return - */ String buildGetResourceListSql(List idList, List selectFieldNameList); - /** - * 生成SQL等效于{@link neatlogic.module.cmdb.dao.mapper.resourcecenter.ResourceMapper#getResourceListByIdList(java.util.List)} - * @param idList - * @return - */ String buildGetResourceListSql(List idList); + String buildGetResourceCountByNameKeywordSql(ResourceSearchVo searchVo); + + String buildGetResourceCountByIpKeywordSql(ResourceSearchVo searchVo); + + String buildGetAuthResourceListSql(ResourceSearchVo searchVo); + + String buildGetResourceListByIpAndPortAndNameWithFilterSql(ResourceSearchVo searchVo); + + String buildGetResourceTypeIdListByAuthSql(ResourceSearchVo searchVo); + + String buildGetResourceIdByIpAndPortAndNameSql(ResourceSearchVo searchVo); + + String buildGetResourceIdListByIpAndPortAndNameSql(ResourceSearchVo searchVo); + + String buildGetResourceListByIpAndPortAndNameSql(ResourceSearchVo searchVo); + + String buildGetResourceByIdListSql(List idList); + + String buildGetResourceByIdSql(Long id, List selectFieldNameList); + + String buildGetResourceByIdSql(Long id); + + String buildGetResourceIdByResourceIdSql(Long id); + + String buildCheckResourceIdListIsExistsSql(List idList); + + String buildGetResourceIdListByAppSystemIdAndModuleIdAndEnvIdSql(ResourceVo resourceVo); + + String buildGetResourceListByTypeIdListAndIpListSql(List typeIdList, List ipList); + + String buildGetResourceByIpAndPortAndNameAndTypeNameSql(String ip, Integer port, String name, String typeName); + + String buildGetResourceByIpAndPortSql(String ip, Integer port); + + String buildSearchAccountComponentSql(AccountComponentVo accountComponentVo); + + String buildSearchAccountComponentCountSql(AccountComponentVo accountComponentVo); + + String buildGetAppEnvListByAppSystemIdAndAppModuleIdSql(Long appSystemId, Long appModuleId); + + String buildGetAppEnvCountMapByAppSystemIdGroupByAppModuleIdSql(Long appSystemId); +// String buildGetResourceCountByDynamicConditionSql(); +// String buildGetResourceIdListByDynamicConditionSql(); + // InspectMapper String buildGetInspectResourceListByIdListSql(List idList, List selectFieldNameList); + String buildGetInspectResourceListByIdListSql(List idList); + String buildGetInspectResourceCountSql(ResourceSearchVo searchVo); + String buildGetInspectResourceCountByIpKeywordSql(ResourceSearchVo searchVo); + String buildGetInspectResourceCountByNameKeywordSql(ResourceSearchVo searchVo); + String buildGetInspectResourceIdListSql(ResourceSearchVo searchVo); + String buildGetInspectAutoexecJobNodeResourceCountSql(ResourceSearchVo searchVo, Long jobId); + String buildGetInspectAutoexecJobNodeResourceCountByIpKeywordSql(ResourceSearchVo searchVo, Long jobId); + String buildGetInspectAutoexecJobNodeResourceCountByNameKeywordSql(ResourceSearchVo searchVo, Long jobId); + String buildGetInspectAutoexecJobNodeResourceIdListSql(ResourceSearchVo searchVo, Long jobId); + String buildGetInspectResourceListByIdListAndJobIdSql(List IdList, Long jobId); + String buildGetInspectResourceListByIdListAndJobIdSql(List IdList, Long jobId, List selectFieldNameList); + // InspectConfigFileMapper -//r String buildgetInspectResourceCountSql(); String buildGetInspectConfigFileResourceIdListSql(ResourceSearchVo searchVo); -//r String buildgetInspectResourceListByIdListSql(); + String buildGetInspectConfigFilePathCountSql(ResourceSearchVo searchVo); + String buildGetInspectConfigFilePathIdListSql(ResourceSearchVo searchVo); + String buildGetInspectConfigFilePathListSql(List idList); + String buildGetInspectConfigFilePathListByJobIdSql(Long jobId); } -- Gitee From 40830773eef02683f12aa36dcbd770d2f907b0d3 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Wed, 13 Aug 2025 15:08:07 +0800 Subject: [PATCH 08/10] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B0=86=E6=B6=89?= =?UTF-8?q?=E5=8F=8Ascence=5Fipobject=5Fdetail=E8=A7=86=E5=9B=BE=E7=9A=84S?= =?UTF-8?q?QL=E8=AF=AD=E5=8F=A5=E6=94=B9=E6=88=90=E5=8A=A8=E6=80=81sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1469827334504448]将涉及scence_ipobject_detail视图的SQL语句改成动态sql http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1469827334504448 --- .../cmdb/crossover/IResourceCenterResourceCrossoverService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java index ea2f1ef..a02a44a 100644 --- a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java @@ -118,6 +118,7 @@ public interface IResourceCenterResourceCrossoverService extends ICrossoverServi String buildGetAppEnvListByAppSystemIdAndAppModuleIdSql(Long appSystemId, Long appModuleId); String buildGetAppEnvCountMapByAppSystemIdGroupByAppModuleIdSql(Long appSystemId); + // String buildGetResourceCountByDynamicConditionSql(); // String buildGetResourceIdListByDynamicConditionSql(); -- Gitee From d3166dd2051d1d6ea507fa8dedae6a343c6aa807 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Wed, 13 Aug 2025 15:50:49 +0800 Subject: [PATCH 09/10] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B0=86=E6=B6=89?= =?UTF-8?q?=E5=8F=8Ascence=5Fipobject=5Fdetail=E8=A7=86=E5=9B=BE=E7=9A=84S?= =?UTF-8?q?QL=E8=AF=AD=E5=8F=A5=E6=94=B9=E6=88=90=E5=8A=A8=E6=80=81sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1469827334504448]将涉及scence_ipobject_detail视图的SQL语句改成动态sql http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1469827334504448 --- .../IResourceBuildSqlCrossoverService.java | 117 ++++++++++++++++++ ...esourceCenterResourceCrossoverService.java | 91 -------------- 2 files changed, 117 insertions(+), 91 deletions(-) create mode 100644 src/main/java/neatlogic/framework/cmdb/crossover/IResourceBuildSqlCrossoverService.java diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceBuildSqlCrossoverService.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceBuildSqlCrossoverService.java new file mode 100644 index 0000000..2a47684 --- /dev/null +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceBuildSqlCrossoverService.java @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2025 深圳极向量科技有限公司 All Rights Reserved. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package neatlogic.framework.cmdb.crossover; + +import neatlogic.framework.cmdb.dto.resourcecenter.AccountComponentVo; +import neatlogic.framework.cmdb.dto.resourcecenter.ResourceSearchVo; +import neatlogic.framework.cmdb.dto.resourcecenter.ResourceVo; +import neatlogic.framework.crossover.ICrossoverService; + +import java.util.List; + +public interface IResourceBuildSqlCrossoverService extends ICrossoverService { + + String buildGetResourceIdListSql(ResourceSearchVo searchVo); + + String buildGetResourceCountSql(ResourceSearchVo searchVo); + + String buildGetResourceListSql(List idList, List selectFieldNameList); + + String buildGetResourceListSql(List idList); + + String buildGetResourceCountByNameKeywordSql(ResourceSearchVo searchVo); + + String buildGetResourceCountByIpKeywordSql(ResourceSearchVo searchVo); + + String buildGetAuthResourceListSql(ResourceSearchVo searchVo); + + String buildGetResourceListByIpAndPortAndNameWithFilterSql(ResourceSearchVo searchVo); + + String buildGetResourceTypeIdListByAuthSql(ResourceSearchVo searchVo); + + String buildGetResourceIdByIpAndPortAndNameSql(ResourceSearchVo searchVo); + + String buildGetResourceIdListByIpAndPortAndNameSql(ResourceSearchVo searchVo); + + String buildGetResourceListByIpAndPortAndNameSql(ResourceSearchVo searchVo); + + String buildGetResourceByIdListSql(List idList); + + String buildGetResourceByIdSql(Long id, List selectFieldNameList); + + String buildGetResourceByIdSql(Long id); + + String buildGetResourceIdByResourceIdSql(Long id); + + String buildCheckResourceIdListIsExistsSql(List idList); + + String buildGetResourceIdListByAppSystemIdAndModuleIdAndEnvIdSql(ResourceVo resourceVo); + + String buildGetResourceListByTypeIdListAndIpListSql(List typeIdList, List ipList); + + String buildGetResourceByIpAndPortAndNameAndTypeNameSql(String ip, Integer port, String name, String typeName); + + String buildGetResourceByIpAndPortSql(String ip, Integer port); + + String buildSearchAccountComponentSql(AccountComponentVo accountComponentVo); + + String buildSearchAccountComponentCountSql(AccountComponentVo accountComponentVo); + + String buildGetAppEnvListByAppSystemIdAndAppModuleIdSql(Long appSystemId, Long appModuleId); + + String buildGetAppEnvCountMapByAppSystemIdGroupByAppModuleIdSql(Long appSystemId); + +// String buildGetResourceCountByDynamicConditionSql(); +// String buildGetResourceIdListByDynamicConditionSql(); + + // InspectMapper + String buildGetInspectResourceListByIdListSql(List idList, List selectFieldNameList); + + String buildGetInspectResourceListByIdListSql(List idList); + + String buildGetInspectResourceCountSql(ResourceSearchVo searchVo); + + String buildGetInspectResourceCountByIpKeywordSql(ResourceSearchVo searchVo); + + String buildGetInspectResourceCountByNameKeywordSql(ResourceSearchVo searchVo); + + String buildGetInspectResourceIdListSql(ResourceSearchVo searchVo); + + String buildGetInspectAutoexecJobNodeResourceCountSql(ResourceSearchVo searchVo, Long jobId); + + String buildGetInspectAutoexecJobNodeResourceCountByIpKeywordSql(ResourceSearchVo searchVo, Long jobId); + + String buildGetInspectAutoexecJobNodeResourceCountByNameKeywordSql(ResourceSearchVo searchVo, Long jobId); + + String buildGetInspectAutoexecJobNodeResourceIdListSql(ResourceSearchVo searchVo, Long jobId); + + String buildGetInspectResourceListByIdListAndJobIdSql(List IdList, Long jobId); + + String buildGetInspectResourceListByIdListAndJobIdSql(List IdList, Long jobId, List selectFieldNameList); + + // InspectConfigFileMapper + String buildGetInspectConfigFileResourceIdListSql(ResourceSearchVo searchVo); + + String buildGetInspectConfigFilePathCountSql(ResourceSearchVo searchVo); + + String buildGetInspectConfigFilePathIdListSql(ResourceSearchVo searchVo); + + String buildGetInspectConfigFilePathListSql(List idList); + + String buildGetInspectConfigFilePathListByJobIdSql(Long jobId); +} diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java index a02a44a..6588112 100644 --- a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCenterResourceCrossoverService.java @@ -16,10 +16,8 @@ along with this program. If not, see .*/ package neatlogic.framework.cmdb.crossover; import com.alibaba.fastjson.JSONObject; -import neatlogic.framework.cmdb.dto.resourcecenter.AccountComponentVo; import neatlogic.framework.cmdb.dto.resourcecenter.AccountVo; import neatlogic.framework.cmdb.dto.resourcecenter.ResourceSearchVo; -import neatlogic.framework.cmdb.dto.resourcecenter.ResourceVo; import neatlogic.framework.cmdb.dto.tag.TagVo; import neatlogic.framework.crossover.ICrossoverService; @@ -69,94 +67,5 @@ public interface IResourceCenterResourceCrossoverService extends ICrossoverServi */ Map> getResourceTagByResourceIdList(List idList); - String buildGetResourceIdListSql(ResourceSearchVo searchVo); - - String buildGetResourceCountSql(ResourceSearchVo searchVo); - - String buildGetResourceListSql(List idList, List selectFieldNameList); - - String buildGetResourceListSql(List idList); - - String buildGetResourceCountByNameKeywordSql(ResourceSearchVo searchVo); - - String buildGetResourceCountByIpKeywordSql(ResourceSearchVo searchVo); - - String buildGetAuthResourceListSql(ResourceSearchVo searchVo); - - String buildGetResourceListByIpAndPortAndNameWithFilterSql(ResourceSearchVo searchVo); - - String buildGetResourceTypeIdListByAuthSql(ResourceSearchVo searchVo); - - String buildGetResourceIdByIpAndPortAndNameSql(ResourceSearchVo searchVo); - - String buildGetResourceIdListByIpAndPortAndNameSql(ResourceSearchVo searchVo); - - String buildGetResourceListByIpAndPortAndNameSql(ResourceSearchVo searchVo); - - String buildGetResourceByIdListSql(List idList); - - String buildGetResourceByIdSql(Long id, List selectFieldNameList); - - String buildGetResourceByIdSql(Long id); - - String buildGetResourceIdByResourceIdSql(Long id); - - String buildCheckResourceIdListIsExistsSql(List idList); - - String buildGetResourceIdListByAppSystemIdAndModuleIdAndEnvIdSql(ResourceVo resourceVo); - - String buildGetResourceListByTypeIdListAndIpListSql(List typeIdList, List ipList); - - String buildGetResourceByIpAndPortAndNameAndTypeNameSql(String ip, Integer port, String name, String typeName); - - String buildGetResourceByIpAndPortSql(String ip, Integer port); - - String buildSearchAccountComponentSql(AccountComponentVo accountComponentVo); - - String buildSearchAccountComponentCountSql(AccountComponentVo accountComponentVo); - - String buildGetAppEnvListByAppSystemIdAndAppModuleIdSql(Long appSystemId, Long appModuleId); - - String buildGetAppEnvCountMapByAppSystemIdGroupByAppModuleIdSql(Long appSystemId); - -// String buildGetResourceCountByDynamicConditionSql(); -// String buildGetResourceIdListByDynamicConditionSql(); - - // InspectMapper - String buildGetInspectResourceListByIdListSql(List idList, List selectFieldNameList); - - String buildGetInspectResourceListByIdListSql(List idList); - - String buildGetInspectResourceCountSql(ResourceSearchVo searchVo); - - String buildGetInspectResourceCountByIpKeywordSql(ResourceSearchVo searchVo); - - String buildGetInspectResourceCountByNameKeywordSql(ResourceSearchVo searchVo); - - String buildGetInspectResourceIdListSql(ResourceSearchVo searchVo); - - String buildGetInspectAutoexecJobNodeResourceCountSql(ResourceSearchVo searchVo, Long jobId); - - String buildGetInspectAutoexecJobNodeResourceCountByIpKeywordSql(ResourceSearchVo searchVo, Long jobId); - - String buildGetInspectAutoexecJobNodeResourceCountByNameKeywordSql(ResourceSearchVo searchVo, Long jobId); - - String buildGetInspectAutoexecJobNodeResourceIdListSql(ResourceSearchVo searchVo, Long jobId); - - String buildGetInspectResourceListByIdListAndJobIdSql(List IdList, Long jobId); - - String buildGetInspectResourceListByIdListAndJobIdSql(List IdList, Long jobId, List selectFieldNameList); - - // InspectConfigFileMapper - String buildGetInspectConfigFileResourceIdListSql(ResourceSearchVo searchVo); - - String buildGetInspectConfigFilePathCountSql(ResourceSearchVo searchVo); - - String buildGetInspectConfigFilePathIdListSql(ResourceSearchVo searchVo); - - String buildGetInspectConfigFilePathListSql(List idList); - - String buildGetInspectConfigFilePathListByJobIdSql(Long jobId); - } -- Gitee From 5597b37b4db3801fa66859a862dff0ce5f074605 Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Wed, 13 Aug 2025 16:55:30 +0800 Subject: [PATCH 10/10] =?UTF-8?q?[=E5=8A=9F=E8=83=BD]=20=E5=B0=86=E6=B6=89?= =?UTF-8?q?=E5=8F=8Ascence=5Fipobject=5Fdetail=E8=A7=86=E5=9B=BE=E7=9A=84S?= =?UTF-8?q?QL=E8=AF=AD=E5=8F=A5=E6=94=B9=E6=88=90=E5=8A=A8=E6=80=81sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1469827334504448]将涉及scence_ipobject_detail视图的SQL语句改成动态sql http://192.168.0.96:8090/demo/rdm.html#/task-detail/939050947543040/939050947543050/1469827334504448 --- .../cmdb/crossover/IResourceCrossoverMapper.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java index 98051ce..6209d80 100644 --- a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java @@ -29,25 +29,24 @@ import org.apache.ibatis.annotations.Param; import java.util.List; public interface IResourceCrossoverMapper extends ICrossoverService { - @Deprecated - int getResourceCount(ResourceSearchVo searchVo); - - int getResourceCountBySql(String sql); int getCountBySql(String sql); + List getIdListBySql(String sql); + + List getResourceListBySql(String sql); + + @Deprecated + int getResourceCount(ResourceSearchVo searchVo); + int getResourceCountByDynamicCondition(@Param("searchVo") ResourceSearchVo searchVo, @Param("conditionSql") String conditionSql); @Deprecated List getResourceIdList(ResourceSearchVo searchVo); - List getResourceIdListBySql(String sql); - List getResourceIdListByDynamicCondition(@Param("searchVo") ResourceSearchVo searchVo, @Param("conditionSql") String conditionSql); @Deprecated List getResourceListByIdList(List idList); - List getResourceListBySql(String sql); - List getAppInstanceResourceListByIdListSimple(List idList); Long getResourceIdByIpAndPortAndName(ResourceSearchVo searchVo); -- Gitee