禁用 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 code: 200
- name: userPermission - name: userPermission
request: request:
api: /orion-visor/api/infra/permission/user api: /orion-visor/api/infra/user-permission/user
header: header:
Authorization: Bearer {{.login.data.token}} Authorization: Bearer {{.login.data.token}}
expect: expect:
@@ -26,7 +26,7 @@ items:
msg: "success" msg: "success"
- name: menu - name: menu
request: request:
api: /orion-visor/api/infra/permission/menu api: /orion-visor/api/infra/user-permission/menu
header: header:
Authorization: Bearer {{.login.data.token}} Authorization: Bearer {{.login.data.token}}
expect: 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.biz.operator.log.core.annotation.OperatorLog;
import com.orion.visor.framework.log.core.annotation.IgnoreLog; import com.orion.visor.framework.log.core.annotation.IgnoreLog;
import com.orion.visor.framework.log.core.enums.IgnoreLogMode; 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.framework.web.core.annotation.RestWrapper;
import com.orion.visor.module.asset.define.operator.HostGroupOperatorType; import com.orion.visor.module.asset.define.operator.HostGroupOperatorType;
import com.orion.visor.module.asset.define.operator.HostIdentityOperatorType; import com.orion.visor.module.asset.define.operator.HostIdentityOperatorType;
@@ -43,6 +44,7 @@ public class AssetDataGrantServiceController {
@Resource @Resource
private AssetAuthorizedDataService assetAuthorizedDataService; private AssetAuthorizedDataService assetAuthorizedDataService;
@DemoDisableApi
@OperatorLog(HostGroupOperatorType.GRANT) @OperatorLog(HostGroupOperatorType.GRANT)
@PutMapping("/grant-host-group") @PutMapping("/grant-host-group")
@Operation(summary = "主机分组授权") @Operation(summary = "主机分组授权")
@@ -60,6 +62,7 @@ public class AssetDataGrantServiceController {
return assetAuthorizedDataService.getAuthorizedDataRelId(DataPermissionTypeEnum.HOST_GROUP, request); return assetAuthorizedDataService.getAuthorizedDataRelId(DataPermissionTypeEnum.HOST_GROUP, request);
} }
@DemoDisableApi
@OperatorLog(HostKeyOperatorType.GRANT) @OperatorLog(HostKeyOperatorType.GRANT)
@PutMapping("/grant-host-key") @PutMapping("/grant-host-key")
@Operation(summary = "主机密钥授权") @Operation(summary = "主机密钥授权")
@@ -77,6 +80,7 @@ public class AssetDataGrantServiceController {
return assetAuthorizedDataService.getAuthorizedDataRelId(DataPermissionTypeEnum.HOST_KEY, request); return assetAuthorizedDataService.getAuthorizedDataRelId(DataPermissionTypeEnum.HOST_KEY, request);
} }
@DemoDisableApi
@OperatorLog(HostIdentityOperatorType.GRANT) @OperatorLog(HostIdentityOperatorType.GRANT)
@PutMapping("/grant-host-identity") @PutMapping("/grant-host-identity")
@Operation(summary = "主机身份授权") @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.common.validator.group.Page;
import com.orion.visor.framework.log.core.annotation.IgnoreLog; import com.orion.visor.framework.log.core.annotation.IgnoreLog;
import com.orion.visor.framework.log.core.enums.IgnoreLogMode; 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.framework.web.core.annotation.RestWrapper;
import com.orion.visor.module.asset.define.operator.ExecTemplateOperatorType; import com.orion.visor.module.asset.define.operator.ExecTemplateOperatorType;
import com.orion.visor.module.asset.entity.request.exec.ExecTemplateCreateRequest; import com.orion.visor.module.asset.entity.request.exec.ExecTemplateCreateRequest;
@@ -41,6 +42,7 @@ public class ExecTemplateController {
@Resource @Resource
private ExecTemplateService execTemplateService; private ExecTemplateService execTemplateService;
@DemoDisableApi
@OperatorLog(ExecTemplateOperatorType.CREATE) @OperatorLog(ExecTemplateOperatorType.CREATE)
@PostMapping("/create") @PostMapping("/create")
@Operation(summary = "创建执行模板") @Operation(summary = "创建执行模板")
@@ -49,6 +51,7 @@ public class ExecTemplateController {
return execTemplateService.createExecTemplate(request); return execTemplateService.createExecTemplate(request);
} }
@DemoDisableApi
@OperatorLog(ExecTemplateOperatorType.UPDATE) @OperatorLog(ExecTemplateOperatorType.UPDATE)
@PutMapping("/update") @PutMapping("/update")
@Operation(summary = "更新执行模板") @Operation(summary = "更新执行模板")
@@ -83,6 +86,7 @@ public class ExecTemplateController {
return execTemplateService.getExecTemplatePage(request); return execTemplateService.getExecTemplatePage(request);
} }
@DemoDisableApi
@OperatorLog(ExecTemplateOperatorType.DELETE) @OperatorLog(ExecTemplateOperatorType.DELETE)
@DeleteMapping("/delete") @DeleteMapping("/delete")
@Operation(summary = "删除执行模板") @Operation(summary = "删除执行模板")
@@ -92,6 +96,7 @@ public class ExecTemplateController {
return execTemplateService.deleteExecTemplateById(id); return execTemplateService.deleteExecTemplateById(id);
} }
@DemoDisableApi
@OperatorLog(ExecTemplateOperatorType.DELETE) @OperatorLog(ExecTemplateOperatorType.DELETE)
@DeleteMapping("/batch-delete") @DeleteMapping("/batch-delete")
@Operation(summary = "批量删除执行模板") @Operation(summary = "批量删除执行模板")

View File

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

View File

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

View File

@@ -45,12 +45,6 @@ public class TagRelServiceImpl implements TagRelService {
@Override @Override
public void addTagRel(String type, Long relId, List<Long> tagIdList) { 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 // 查询 tag
List<TagDO> tagList = tagDAO.selectBatchIds(tagIdList); List<TagDO> tagList = tagDAO.selectBatchIds(tagIdList);
// 插入引用 // 插入引用
@@ -63,9 +57,6 @@ public class TagRelServiceImpl implements TagRelService {
.build()) .build())
.collect(Collectors.toList()); .collect(Collectors.toList());
tagRelDAO.insertBatch(tagRelList); tagRelDAO.insertBatch(tagRelList);
// 设置缓存
String cacheKey = TagCacheKeyDefine.TAG_REL.format(type, relId);
RedisStrings.setJson(cacheKey, TagCacheKeyDefine.TAG_REL, TagRelConvert.MAPPER.toCacheList(tagRelList));
} }
@Override @Override