【7.1.6】【scanner】DevOpsReportResourceParam新增一个参数

pull/25/head
fengshuonan 2022-01-11 15:17:41 +08:00
parent 7e4fe62160
commit 272326e5a7
5 changed files with 29 additions and 11 deletions

View File

@ -38,7 +38,7 @@ import java.util.Map;
public interface DevOpsReportApi {
/**
*
* DevOps
*
* @param devOpsReportProperties DevOps
* @param resourceDefinitions

View File

@ -57,4 +57,9 @@ public interface ScannerConstants {
*/
String VIEW_CONTROLLER_PATH_START_WITH = "/view";
/**
* FieldMetadata
*/
String FIELD_METADATA_CLASS_ALL_PATH = "cn.stylefeng.roses.kernel.scanner.api.pojo.resource.FieldMetadata";
}

View File

@ -58,9 +58,15 @@ public class DevOpsReportResourceParam extends BaseRequest {
*/
private Map<String, Map<String, ResourceDefinition>> resourceDefinitions;
public DevOpsReportResourceParam(String projectUniqueCode, String interactionToken, Map<String, Map<String, ResourceDefinition>> resourceDefinitions) {
/**
* FieldMetadata
*/
private String fieldMetadataClassPath;
public DevOpsReportResourceParam(String projectUniqueCode, String interactionToken, Map<String, Map<String, ResourceDefinition>> resourceDefinitions, String fieldMetadataClassPath) {
this.projectUniqueCode = projectUniqueCode;
this.interactionToken = interactionToken;
this.resourceDefinitions = resourceDefinitions;
this.fieldMetadataClassPath = fieldMetadataClassPath;
}
}

View File

@ -77,9 +77,4 @@ public interface SystemConstants {
*/
String THEME_GUNS_PLATFORM = "GUNS_PLATFORM";
/**
* FieldMetadata
*/
String FIELD_METADATA_CLASS_ALL_PATH = "cn.stylefeng.roses.kernel.scanner.api.pojo.resource.FieldMetadata";
}

View File

@ -24,7 +24,6 @@
*/
package cn.stylefeng.roses.kernel.system.modular.resource.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.stylefeng.roses.kernel.auth.api.LoginUserApi;
import cn.stylefeng.roses.kernel.auth.api.context.LoginContext;
@ -37,13 +36,14 @@ import cn.stylefeng.roses.kernel.rule.constants.RuleConstants;
import cn.stylefeng.roses.kernel.rule.constants.TreeConstants;
import cn.stylefeng.roses.kernel.rule.enums.YesOrNotEnum;
import cn.stylefeng.roses.kernel.rule.tree.factory.DefaultTreeBuildFactory;
import cn.stylefeng.roses.kernel.scanner.api.DevOpsReportApi;
import cn.stylefeng.roses.kernel.scanner.api.ResourceReportApi;
import cn.stylefeng.roses.kernel.scanner.api.pojo.devops.DevOpsReportProperties;
import cn.stylefeng.roses.kernel.scanner.api.pojo.resource.ReportResourceParam;
import cn.stylefeng.roses.kernel.scanner.api.pojo.resource.ResourceDefinition;
import cn.stylefeng.roses.kernel.scanner.api.pojo.resource.ResourceUrlParam;
import cn.stylefeng.roses.kernel.system.api.ResourceServiceApi;
import cn.stylefeng.roses.kernel.system.api.RoleServiceApi;
import cn.stylefeng.roses.kernel.system.api.pojo.resource.ExternalResourceRequest;
import cn.stylefeng.roses.kernel.system.api.pojo.resource.LayuiApiResourceTreeNode;
import cn.stylefeng.roses.kernel.system.api.pojo.resource.ResourceRequest;
import cn.stylefeng.roses.kernel.system.api.pojo.role.dto.SysRoleResourceDTO;
@ -73,7 +73,7 @@ import java.util.stream.Collectors;
* @date 2020/11/23 22:45
*/
@Service
public class SysResourceServiceImpl extends ServiceImpl<SysResourceMapper, SysResource> implements SysResourceService, ResourceReportApi, ResourceServiceApi {
public class SysResourceServiceImpl extends ServiceImpl<SysResourceMapper, SysResource> implements SysResourceService, ResourceReportApi, ResourceServiceApi, DevOpsReportApi {
@Resource
private SysResourceMapper resourceMapper;
@ -270,7 +270,6 @@ public class SysResourceServiceImpl extends ServiceImpl<SysResourceMapper, SysRe
}
@Override
@Transactional(rollbackFor = Exception.class)
public void reportResources(@RequestBody ReportResourceParam reportResourceReq) {
@ -369,6 +368,19 @@ public class SysResourceServiceImpl extends ServiceImpl<SysResourceMapper, SysRe
return this.count();
}
@Override
public void reportResources(DevOpsReportProperties devOpsReportProperties, Map<String, Map<String, ResourceDefinition>> resourceDefinitions) {
// 获取运维平台相关配置
// jwt秘钥生成
// 进行post请求汇报资源
}
/**
* wrapper
*