diff --git a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java index c562a032a144e2b32e75dcb25e66d0762c1eb408..f33cc973347d99eaf4c0f0b669fbad47c744cb79 100644 --- a/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java +++ b/src/main/java/neatlogic/framework/cmdb/crossover/IResourceCrossoverMapper.java @@ -62,6 +62,8 @@ public interface IResourceCrossoverMapper extends ICrossoverService { List getResourceByIdList(List idList); + List getAuthResourceList(ResourceSearchVo searchVo); + ResourceVo getResourceById(Long id); int checkResourceIsExists(Long id); @@ -88,7 +90,7 @@ public interface IResourceCrossoverMapper extends ICrossoverService { List getResourceAppSystemListByResourceIdList(List id); - List getResourceListByResourceVoList(@Param("resourceList") List resourceList); + List getResourceListByResourceVoList(@Param("resourceList") List resourceList,@Param("searchVo") ResourceSearchVo searchVo); Long getAppSystemIdByResourceId(Long id); diff --git a/src/main/java/neatlogic/framework/cmdb/dto/group/GroupVo.java b/src/main/java/neatlogic/framework/cmdb/dto/group/GroupVo.java index 9df7f1f19be8c8ea02d91dee27da82555dcfc6d5..51e22ebb72c250d488385bf32939ab4ab6f416dc 100644 --- a/src/main/java/neatlogic/framework/cmdb/dto/group/GroupVo.java +++ b/src/main/java/neatlogic/framework/cmdb/dto/group/GroupVo.java @@ -16,11 +16,13 @@ package neatlogic.framework.cmdb.dto.group; +import neatlogic.framework.cmdb.enums.CmdbTenantConfig; import neatlogic.framework.cmdb.enums.group.GroupType; import neatlogic.framework.cmdb.enums.group.Status; import neatlogic.framework.common.config.Config; import neatlogic.framework.common.constvalue.ApiParamType; import neatlogic.framework.common.dto.BaseEditorVo; +import neatlogic.framework.config.ConfigManager; import neatlogic.framework.restful.annotation.EntityField; import neatlogic.framework.util.SnowflakeUtil; import com.alibaba.fastjson.annotation.JSONField; @@ -195,4 +197,8 @@ public class GroupVo extends BaseEditorVo { this.type = type; } + public String getIsResourcecenterAuth() { + return ConfigManager.getConfig(CmdbTenantConfig.IS_RESOURCECENTER_AUTH); + } + } 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 151e4a37c32aa4989df9e2d324b846cea3f586ed..bedd5c329084372345b34481e8ddb514eb5f1d8c 100644 --- a/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/ResourceSearchVo.java +++ b/src/main/java/neatlogic/framework/cmdb/dto/resourcecenter/ResourceSearchVo.java @@ -110,6 +110,12 @@ public class ResourceSearchVo extends ConditionConfigVo { public ResourceSearchVo(JSONObject jsonObj) { super(jsonObj); } + + public ResourceSearchVo(ResourceVo resourceVo) { + this.ip = resourceVo.getIp(); + this.port = resourceVo.getPort() != null ? resourceVo.getPort().toString() : null; + } + public ResourceSearchVo(List tagIdList) { this.tagIdList = tagIdList; }