禁用 demo api.

This commit is contained in:
lijiahang
2024-08-26 13:57:18 +08:00
parent ee9f51ce7d
commit 6c60756e54
6 changed files with 17 additions and 11 deletions

View File

@@ -17,7 +17,7 @@ items:
code: 200
- name: userPermission
request:
api: /orion-visor/api/infra/permission/user
api: /orion-visor/api/infra/user-permission/user
header:
Authorization: Bearer {{.login.data.token}}
expect:
@@ -26,7 +26,7 @@ items:
msg: "success"
- name: menu
request:
api: /orion-visor/api/infra/permission/menu
api: /orion-visor/api/infra/user-permission/menu
header:
Authorization: Bearer {{.login.data.token}}
expect:

View File

@@ -3,6 +3,7 @@ package com.orion.visor.module.asset.controller;
import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
import com.orion.visor.framework.web.core.annotation.RestWrapper;
import com.orion.visor.module.asset.define.operator.HostGroupOperatorType;
import com.orion.visor.module.asset.define.operator.HostIdentityOperatorType;
@@ -43,6 +44,7 @@ public class AssetDataGrantServiceController {
@Resource
private AssetAuthorizedDataService assetAuthorizedDataService;
@DemoDisableApi
@OperatorLog(HostGroupOperatorType.GRANT)
@PutMapping("/grant-host-group")
@Operation(summary = "主机分组授权")
@@ -60,6 +62,7 @@ public class AssetDataGrantServiceController {
return assetAuthorizedDataService.getAuthorizedDataRelId(DataPermissionTypeEnum.HOST_GROUP, request);
}
@DemoDisableApi
@OperatorLog(HostKeyOperatorType.GRANT)
@PutMapping("/grant-host-key")
@Operation(summary = "主机密钥授权")
@@ -77,6 +80,7 @@ public class AssetDataGrantServiceController {
return assetAuthorizedDataService.getAuthorizedDataRelId(DataPermissionTypeEnum.HOST_KEY, request);
}
@DemoDisableApi
@OperatorLog(HostIdentityOperatorType.GRANT)
@PutMapping("/grant-host-identity")
@Operation(summary = "主机身份授权")

View File

@@ -5,6 +5,7 @@ import com.orion.visor.framework.biz.operator.log.core.annotation.OperatorLog;
import com.orion.visor.framework.common.validator.group.Page;
import com.orion.visor.framework.log.core.annotation.IgnoreLog;
import com.orion.visor.framework.log.core.enums.IgnoreLogMode;
import com.orion.visor.framework.web.core.annotation.DemoDisableApi;
import com.orion.visor.framework.web.core.annotation.RestWrapper;
import com.orion.visor.module.asset.define.operator.ExecTemplateOperatorType;
import com.orion.visor.module.asset.entity.request.exec.ExecTemplateCreateRequest;
@@ -41,6 +42,7 @@ public class ExecTemplateController {
@Resource
private ExecTemplateService execTemplateService;
@DemoDisableApi
@OperatorLog(ExecTemplateOperatorType.CREATE)
@PostMapping("/create")
@Operation(summary = "创建执行模板")
@@ -49,6 +51,7 @@ public class ExecTemplateController {
return execTemplateService.createExecTemplate(request);
}
@DemoDisableApi
@OperatorLog(ExecTemplateOperatorType.UPDATE)
@PutMapping("/update")
@Operation(summary = "更新执行模板")
@@ -83,6 +86,7 @@ public class ExecTemplateController {
return execTemplateService.getExecTemplatePage(request);
}
@DemoDisableApi
@OperatorLog(ExecTemplateOperatorType.DELETE)
@DeleteMapping("/delete")
@Operation(summary = "删除执行模板")
@@ -92,6 +96,7 @@ public class ExecTemplateController {
return execTemplateService.deleteExecTemplateById(id);
}
@DemoDisableApi
@OperatorLog(ExecTemplateOperatorType.DELETE)
@DeleteMapping("/batch-delete")
@Operation(summary = "批量删除执行模板")

View File

@@ -48,6 +48,7 @@ public class SystemRoleController {
@Resource
private SystemRoleMenuService systemRoleMenuService;
@DemoDisableApi
@OperatorLog(SystemRoleOperatorType.CREATE)
@PostMapping("/create")
@Operation(summary = "创建角色")
@@ -56,6 +57,7 @@ public class SystemRoleController {
return systemRoleService.createSystemRole(request);
}
@DemoDisableApi
@OperatorLog(SystemRoleOperatorType.UPDATE)
@PutMapping("/update")
@Operation(summary = "通过 id 更新角色")
@@ -116,6 +118,7 @@ public class SystemRoleController {
return systemRoleService.deleteSystemRoleById(id);
}
@DemoDisableApi
@OperatorLog(SystemRoleOperatorType.GRANT_MENU)
@PutMapping("/grant-menu")
@Operation(summary = "分配角色菜单")

View File

@@ -55,6 +55,7 @@ public class SystemUserController {
@Resource
private OperatorLogService operatorLogService;
@DemoDisableApi
@OperatorLog(SystemUserOperatorType.CREATE)
@PostMapping("/create")
@Operation(summary = "创建用户")
@@ -63,6 +64,7 @@ public class SystemUserController {
return systemUserService.createSystemUser(request);
}
@DemoDisableApi
@OperatorLog(SystemUserOperatorType.UPDATE)
@PutMapping("/update")
@Operation(summary = "通过 id 更新用户")
@@ -82,6 +84,7 @@ public class SystemUserController {
return systemUserService.updateUserStatus(request);
}
@DemoDisableApi
@OperatorLog(SystemUserOperatorType.GRANT_ROLE)
@PutMapping("/grant-role")
@Operation(summary = "分配用户角色")

View File

@@ -45,12 +45,6 @@ public class TagRelServiceImpl implements TagRelService {
@Override
public void addTagRel(String type, Long relId, List<Long> tagIdList) {
// 删除引用
TagRelQueryRequest deleteRequest = new TagRelQueryRequest();
deleteRequest.setTagType(type);
deleteRequest.setRelId(relId);
LambdaQueryWrapper<TagRelDO> deleteWrapper = this.buildQueryWrapper(deleteRequest);
tagRelDAO.delete(deleteWrapper);
// 查询 tag
List<TagDO> tagList = tagDAO.selectBatchIds(tagIdList);
// 插入引用
@@ -63,9 +57,6 @@ public class TagRelServiceImpl implements TagRelService {
.build())
.collect(Collectors.toList());
tagRelDAO.insertBatch(tagRelList);
// 设置缓存
String cacheKey = TagCacheKeyDefine.TAG_REL.format(type, relId);
RedisStrings.setJson(cacheKey, TagCacheKeyDefine.TAG_REL, TagRelConvert.MAPPER.toCacheList(tagRelList));
}
@Override