mirror of https://gitee.com/stylefeng/roses
【7.1.6】【scanner】DevOpsReportResourceParam新增一个参数
parent
7e4fe62160
commit
272326e5a7
|
@ -38,7 +38,7 @@ import java.util.Map;
|
|||
public interface DevOpsReportApi {
|
||||
|
||||
/**
|
||||
* 汇报资源接口
|
||||
* 向DevOps一体化平台汇报资源
|
||||
*
|
||||
* @param devOpsReportProperties DevOps平台的系统配置
|
||||
* @param resourceDefinitions 资源汇报具体数据
|
||||
|
|
|
@ -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";
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue