refactor: 补充接口描述信息
This commit is contained in:
parent
fe9c3ea07f
commit
b1c1d05735
|
@ -26,7 +26,7 @@ import java.util.List;
|
|||
* @author : jianxing
|
||||
* @date : 2023-6-9
|
||||
*/
|
||||
@Tag(name = "全局用户组")
|
||||
@Tag(name = "系统设置-用户组")
|
||||
@RestController
|
||||
@RequestMapping("/user/role/global")
|
||||
public class GlobalUserRoleController {
|
||||
|
@ -35,21 +35,21 @@ public class GlobalUserRoleController {
|
|||
private GlobalUserRoleService globalUserRoleService;
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获取全局用户组列表")
|
||||
@Operation(summary = "系统设置-用户组-获取全局用户组列表")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_USER_ROLE_READ)
|
||||
public List<UserRole> list() {
|
||||
return globalUserRoleService.list();
|
||||
}
|
||||
|
||||
@GetMapping("/permission/setting/{id}")
|
||||
@Operation(summary = "获取全局用户组对应的权限配置")
|
||||
@Operation(summary = "系统设置-用户组-获取全局用户组对应的权限配置")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_USER_ROLE_READ)
|
||||
public List<PermissionDefinitionItem> getPermissionSetting(@PathVariable String id) {
|
||||
return globalUserRoleService.getPermissionSetting(id);
|
||||
}
|
||||
|
||||
@PostMapping("/permission/update")
|
||||
@Operation(summary = "编辑全局用户组对应的权限配置")
|
||||
@Operation(summary = "系统设置-用户组-编辑全局用户组对应的权限配置")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_USER_ROLE_UPDATE)
|
||||
@Log(type = OperationLogType.UPDATE, expression = "#msClass.updateLog(#request)", msClass = GlobalUserRoleLogService.class)
|
||||
public void updatePermissionSetting(@Validated @RequestBody PermissionSettingUpdateRequest request) {
|
||||
|
@ -57,7 +57,7 @@ public class GlobalUserRoleController {
|
|||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@Operation(summary = "添加自定义全局用户组")
|
||||
@Operation(summary = "系统设置-用户组-添加自定义全局用户组")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_USER_ROLE_ADD)
|
||||
@Log(type = OperationLogType.ADD, expression = "#msClass.addLog(#request)", msClass = GlobalUserRoleLogService.class)
|
||||
public UserRole add(@Validated({Created.class}) @RequestBody UserRoleUpdateRequest request) {
|
||||
|
@ -68,7 +68,7 @@ public class GlobalUserRoleController {
|
|||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "更新自定义全局用户组")
|
||||
@Operation(summary = "系统设置-用户组-更新自定义全局用户组")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_USER_ROLE_UPDATE)
|
||||
@Log(type = OperationLogType.UPDATE, expression = "#msClass.updateLog(#request)", msClass = GlobalUserRoleLogService.class)
|
||||
public UserRole update(@Validated({Updated.class}) @RequestBody UserRoleUpdateRequest request) {
|
||||
|
@ -78,7 +78,7 @@ public class GlobalUserRoleController {
|
|||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@Operation(summary = "删除自定义全局用户组")
|
||||
@Operation(summary = "系统设置-用户组-删除自定义全局用户组")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_USER_ROLE_DELETE)
|
||||
@Log(type = OperationLogType.DELETE, expression = "#msClass.deleteLog(#id)", msClass = GlobalUserRoleLogService.class)
|
||||
public void delete(@PathVariable String id) {
|
||||
|
|
|
@ -31,7 +31,7 @@ import java.util.List;
|
|||
* @date : 2023-6-12
|
||||
*/
|
||||
@RestController
|
||||
@Tag(name = "全局用户组与用户的关联关系")
|
||||
@Tag(name = "系统设置-用户组与用户关联关系")
|
||||
@RequestMapping("/user/role/relation/global")
|
||||
public class GlobalUserRoleRelationController {
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class GlobalUserRoleRelationController {
|
|||
private GlobalUserRoleRelationService globalUserRoleRelationService;
|
||||
|
||||
@PostMapping("/list")
|
||||
@Operation(summary = "获取全局用户组对应的用户列表")
|
||||
@Operation(summary = "系统设置-用户组与用户关联关系-获取全局用户组对应的用户列表")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_USER_ROLE_READ)
|
||||
public Pager<List<UserRoleRelationUserDTO>> list(@Validated @RequestBody GlobalUserRoleRelationQueryRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(), true);
|
||||
|
@ -47,7 +47,7 @@ public class GlobalUserRoleRelationController {
|
|||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@Operation(summary = "创建全局用户组和用户的关联关系")
|
||||
@Operation(summary = "系统设置-用户组与用户关联关系-创建全局用户组和用户的关联关系")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_USER_ROLE_UPDATE)
|
||||
@Log(type = OperationLogType.ADD, expression = "#msClass.addLog(#request)", msClass = GlobalUserRoleRelationLogService.class)
|
||||
public void add(@Validated({Created.class}) @RequestBody GlobalUserRoleRelationUpdateRequest request) {
|
||||
|
@ -56,7 +56,7 @@ public class GlobalUserRoleRelationController {
|
|||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@Operation(summary = "删除全局用户组和用户的关联关系")
|
||||
@Operation(summary = "系统设置-用户组与用户关联关系-删除全局用户组和用户的关联关系")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_USER_ROLE_UPDATE)
|
||||
@Log(type = OperationLogType.DELETE, expression = "#msClass.deleteLog(#id)", msClass = GlobalUserRoleRelationLogService.class)
|
||||
public void delete(@PathVariable String id) {
|
||||
|
@ -64,7 +64,7 @@ public class GlobalUserRoleRelationController {
|
|||
}
|
||||
|
||||
@GetMapping("/user/option/{roleId}")
|
||||
@Operation(summary = "系统用户组-用户下拉选项")
|
||||
@Operation(summary = "系统设置-用户组与用户关联关系-获取需要关联的用户选项")
|
||||
@RequiresPermissions(value = {PermissionConstants.SYSTEM_USER_ROLE_READ})
|
||||
public List<ExcludeOptionDTO> getSelectOption(@Parameter(description = "用户组ID", schema = @Schema(requiredMode = Schema.RequiredMode.REQUIRED))
|
||||
@PathVariable String roleId) {
|
||||
|
|
|
@ -31,21 +31,21 @@ import java.util.List;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/plugin")
|
||||
@Tag(name = "插件")
|
||||
@Tag(name = "系统设置-插件")
|
||||
public class PluginController {
|
||||
|
||||
@Resource
|
||||
private PluginService pluginService;
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获取插件列表")
|
||||
@Operation(summary = "系统设置-插件-获取插件列表")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_PLUGIN_READ)
|
||||
public List<PluginDTO> list() {
|
||||
return pluginService.list();
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@Operation(summary = "创建插件")
|
||||
@Operation(summary = "系统设置-插件-创建插件")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_PLUGIN_ADD)
|
||||
@Log(type = OperationLogType.UPDATE, expression = "#msClass.addLog(#request)", msClass = PluginLogService.class)
|
||||
public Plugin add(@Validated({Created.class}) @RequestPart(value = "request") PluginUpdateRequest request,
|
||||
|
@ -55,7 +55,7 @@ public class PluginController {
|
|||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "更新插件")
|
||||
@Operation(summary = "系统设置-插件-更新插件")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_PLUGIN_UPDATE)
|
||||
@Log(type = OperationLogType.ADD, expression = "#msClass.updateLog(#request)", msClass = PluginLogService.class)
|
||||
public Plugin update(@Validated({Updated.class}) @RequestBody PluginUpdateRequest request) {
|
||||
|
@ -65,7 +65,7 @@ public class PluginController {
|
|||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@Operation(summary = "删除插件")
|
||||
@Operation(summary = "系统设置-插件-删除插件")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_PLUGIN_DELETE)
|
||||
@Log(type = OperationLogType.DELETE, expression = "#msClass.deleteLog(#id)", msClass = PluginLogService.class)
|
||||
public void delete(@PathVariable String id) {
|
||||
|
@ -73,13 +73,14 @@ public class PluginController {
|
|||
}
|
||||
|
||||
@GetMapping("/script/get/{pluginId}/{scriptId}")
|
||||
@Operation(summary = "获取插件对应表单的脚本内容")
|
||||
@Operation(summary = "系统设置-插件-获取插件对应表单的脚本内容")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_PLUGIN_READ)
|
||||
public String getScript(@PathVariable String pluginId, @PathVariable String scriptId) {
|
||||
return pluginService.getScript(pluginId, scriptId);
|
||||
}
|
||||
|
||||
@GetMapping("/image/{pluginId}")
|
||||
@Operation(summary = "系统设置-插件-获取插件的图片资源")
|
||||
public void getPluginImg(
|
||||
@Schema(description = "插件ID", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@PathVariable("pluginId")
|
||||
|
|
|
@ -28,21 +28,21 @@ import java.util.List;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/service/integration")
|
||||
@Tag(name = "服务集成")
|
||||
@Tag(name = "组织-服务集成")
|
||||
public class ServiceIntegrationController {
|
||||
|
||||
@Resource
|
||||
private ServiceIntegrationService serviceIntegrationService;
|
||||
|
||||
@GetMapping("/list/{organizationId}")
|
||||
@Operation(summary = "获取服务集成列表")
|
||||
@Operation(summary = "组织-服务集成-获取服务集成列表")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_SERVICE_INTEGRATION_READ)
|
||||
public List<ServiceIntegrationDTO> list(@PathVariable String organizationId) {
|
||||
return serviceIntegrationService.list(organizationId);
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@Operation(summary = "创建服务集成")
|
||||
@Operation(summary = "组织-服务集成-创建服务集成")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_SERVICE_INTEGRATION_ADD)
|
||||
@Log(type = OperationLogType.UPDATE, expression = "#msClass.addLog(#request)", msClass = ServiceIntegrationLogService.class)
|
||||
public ServiceIntegration add(@Validated({Created.class}) @RequestBody ServiceIntegrationUpdateRequest request) {
|
||||
|
@ -50,7 +50,7 @@ public class ServiceIntegrationController {
|
|||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@Operation(summary = "更新服务集成")
|
||||
@Operation(summary = "组织-服务集成-更新服务集成")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_SERVICE_INTEGRATION_UPDATE)
|
||||
@Log(type = OperationLogType.ADD, expression = "#msClass.updateLog(#request)", msClass = ServiceIntegrationLogService.class)
|
||||
public ServiceIntegration update(@Validated({Updated.class}) @RequestBody ServiceIntegrationUpdateRequest request) {
|
||||
|
@ -58,7 +58,7 @@ public class ServiceIntegrationController {
|
|||
}
|
||||
|
||||
@GetMapping("/delete/{id}")
|
||||
@Operation(summary = "删除服务集成")
|
||||
@Operation(summary = "组织-服务集成-删除服务集成")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_SERVICE_INTEGRATION_DELETE)
|
||||
@Log(type = OperationLogType.DELETE, expression = "#msClass.deleteLog(#id)", msClass = ServiceIntegrationLogService.class)
|
||||
public void delete(@PathVariable String id) {
|
||||
|
@ -66,7 +66,7 @@ public class ServiceIntegrationController {
|
|||
}
|
||||
|
||||
@PostMapping("/validate/{pluginId}")
|
||||
@Operation(summary = "校验服务集成信息")
|
||||
@Operation(summary = "组织-服务集成-校验服务集成信息")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_SERVICE_INTEGRATION_UPDATE)
|
||||
public void validate(@PathVariable String pluginId,
|
||||
@Validated({Updated.class})
|
||||
|
@ -78,14 +78,14 @@ public class ServiceIntegrationController {
|
|||
}
|
||||
|
||||
@GetMapping("/validate/{id}")
|
||||
@Operation(summary = "校验服务集成信息")
|
||||
@Operation(summary = "组织-服务集成-校验服务集成信息")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_SERVICE_INTEGRATION_UPDATE)
|
||||
public void validate(@PathVariable String id) {
|
||||
serviceIntegrationService.validate(id);
|
||||
}
|
||||
|
||||
@GetMapping("/script/{pluginId}")
|
||||
@Operation(summary = "获取前端配置脚本")
|
||||
@Operation(summary = "组织-服务集成-获取前端配置脚本")
|
||||
@RequiresPermissions(PermissionConstants.SYSTEM_SERVICE_INTEGRATION_READ)
|
||||
public Object getPluginScript(@PathVariable String pluginId) {
|
||||
return serviceIntegrationService.getPluginScript(pluginId);
|
||||
|
|
|
@ -12,7 +12,6 @@ import io.metersphere.system.controller.param.PluginUpdateRequestDefinition;
|
|||
import io.metersphere.system.domain.*;
|
||||
import io.metersphere.system.dto.OrganizationDTO;
|
||||
import io.metersphere.system.dto.PluginDTO;
|
||||
import io.metersphere.system.mapper.ExtPluginMapper;
|
||||
import io.metersphere.system.mapper.PluginMapper;
|
||||
import io.metersphere.system.mapper.PluginOrganizationMapper;
|
||||
import io.metersphere.system.mapper.PluginScriptMapper;
|
||||
|
@ -48,8 +47,6 @@ public class PluginControllerTests extends BaseTest {
|
|||
@Resource
|
||||
private PluginMapper pluginMapper;
|
||||
@Resource
|
||||
private ExtPluginMapper extPluginMapper;
|
||||
@Resource
|
||||
private BaseUserService baseUserService;
|
||||
@Resource
|
||||
private PluginOrganizationMapper pluginOrganizationMapper;
|
||||
|
|
Loading…
Reference in New Issue