From 8e74722af0692c1cd403bac3ccb7bd05e0ed07fc Mon Sep 17 00:00:00 2001 From: "1437892690@qq.com" <1437892690@qq.com> Date: Thu, 10 Apr 2025 16:02:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E5=B7=A1=E6=A3=80-=E5=AF=B9=E5=BA=94=E7=94=A8=E5=8F=91?= =?UTF-8?q?=E8=B5=B7=E5=B7=A1=E6=A3=80=EF=BC=8C=E7=8E=AF=E5=A2=83=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E6=A8=A1=E5=9D=97=E7=BC=BA=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1395725181616128]应用巡检-对应用发起巡检,环境下的模块缺失 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1395725181616128 --- .../appenv/ListAppEnvForSelectApi.java | 4 +- .../mapper/resourcecenter/ResourceMapper.java | 2 +- .../mapper/resourcecenter/ResourceMapper.xml | 10 +++- .../DefaultResourceCenterDataSourceImpl.java | 47 ++++++++++++++++--- 4 files changed, 53 insertions(+), 10 deletions(-) diff --git a/src/main/java/neatlogic/module/cmdb/api/resourcecenter/appenv/ListAppEnvForSelectApi.java b/src/main/java/neatlogic/module/cmdb/api/resourcecenter/appenv/ListAppEnvForSelectApi.java index 34f801b2..7956c347 100644 --- a/src/main/java/neatlogic/module/cmdb/api/resourcecenter/appenv/ListAppEnvForSelectApi.java +++ b/src/main/java/neatlogic/module/cmdb/api/resourcecenter/appenv/ListAppEnvForSelectApi.java @@ -66,8 +66,10 @@ public class ListAppEnvForSelectApi extends PrivateApiComponentBase { @Override public Object myDoService(JSONObject paramObj) throws Exception { BasePageVo searchVo = paramObj.toJavaObject(BasePageVo.class); + Boolean needPage = paramObj.getBoolean("needPage"); + needPage = needPage == null || needPage; IResourceCenterDataSource resourceCenterDataSource = ResourceCenterDataSourceFactory.getResourceCenterDataSource(); - List tbodyList = resourceCenterDataSource.getAppEnvListForSelect(searchVo); + List tbodyList = resourceCenterDataSource.getAppEnvListForSelect(searchVo, needPage); return TableResultUtil.getResult(tbodyList, searchVo); } } diff --git a/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceMapper.java b/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceMapper.java index cf1558dd..9b3b228d 100644 --- a/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceMapper.java +++ b/src/main/java/neatlogic/module/cmdb/dao/mapper/resourcecenter/ResourceMapper.java @@ -165,7 +165,7 @@ public interface ResourceMapper extends IResourceCrossoverMapper { List getAppSystemListByKeyword(BasePageVo searchVo); - List getAppEnvListByAppSystemId(Long appSystemId); + List getAppEnvListByViewNameAndAppSystemIdAndInspectStatusList(@Param("viewName") String viewName, @Param("appSystemId") Long appSystemId, @Param("inspectStatusList") List inspectStatusList); List getAppEnvListByAppSystemIdAndAppModuleId(@Param("appSystemId") Long appSystemId, @Param("appModuleId") Long appModuleId); 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 aef65ae5..88c34f8a 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 @@ -1600,16 +1600,22 @@ along with this program. If not, see .--> - SELECT IFNULL(a.env_id, -2) as id, IFNULL(a.env_name, '未配置') as name, IFNULL(a.env_seq_no, 9999) as seqNo, a.app_module_id as moduleId, a.app_module_name as moduleName, a.app_module_abbr_name as moduleAbbrName - FROM @{DATA_SCHEMA}.`scence_ipobject_detail` a + FROM @{DATA_SCHEMA}.`${viewName}` a WHERE a.`app_system_id` = #{appSystemId} AND a.app_module_id is not null + + AND a.`inspect_status` IN + + #{inspectStatus} + + - -