refactor(系统设置): 补充swagger描述

This commit is contained in:
WangXu10 2023-08-28 14:44:00 +08:00 committed by fit2-zhao
parent dfecb1e699
commit 0f84ff340f
5 changed files with 27 additions and 26 deletions

View File

@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
@Tag(name = "认证设置")
@Tag(name = "系统设置-认证设置")
@RestController
@RequestMapping("/system/authsource")
@Data
@ -40,7 +40,7 @@ public class AuthSourceController {
private LdapService ldapService;
@PostMapping("/list")
@Operation(summary = "认证设置列表查询")
@Operation(summary = "系统设置-认证设置-列表查询")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_AUTH_READ)
public Pager<List<AuthSource>> list(@Validated @RequestBody BasePageRequest request) {
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
@ -49,7 +49,7 @@ public class AuthSourceController {
}
@PostMapping("/add")
@Operation(summary = "新增认证设置")
@Operation(summary = "系统设置-认证设置-新增")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_AUTH_READ_ADD)
@Log(type = OperationLogType.ADD, expression = "#msClass.addLog(#authSource)", msClass = AuthSourceLogService.class)
public AuthSource add(@Validated @RequestBody AuthSourceRequest authSource) {
@ -57,7 +57,7 @@ public class AuthSourceController {
}
@PostMapping("/update")
@Operation(summary = "更新认证设置")
@Operation(summary = "系统设置-认证设置-更新")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_AUTH_READ_UPDATE)
@Log(type = OperationLogType.UPDATE, expression = "#msClass.updateLog(#authSource)", msClass = AuthSourceLogService.class)
public AuthSourceRequest update(@Validated @RequestBody AuthSourceRequest authSource) {
@ -65,14 +65,14 @@ public class AuthSourceController {
}
@GetMapping("/get/{id}")
@Operation(summary = "获取认证设置详细信息")
@Operation(summary = "系统设置-认证设置-详细信息")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_AUTH_READ)
public AuthSourceDTO get(@PathVariable(value = "id") String id) {
return authSourceService.getAuthSource(id);
}
@GetMapping("/delete/{id}")
@Operation(summary = "删除认证设置")
@Operation(summary = "系统设置-认证设置-删除")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_AUTH_READ_DELETE)
@Log(type = OperationLogType.DELETE, expression = "#msClass.deleteLog(#id)", msClass = AuthSourceLogService.class)
public void delete(@PathVariable(value = "id") String id) {
@ -81,7 +81,7 @@ public class AuthSourceController {
@PostMapping("/update/status")
@Operation(summary = "更新状态")
@Operation(summary = "系统设置-认证设置-更新状态")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_AUTH_READ_UPDATE)
@Log(type = OperationLogType.UPDATE, expression = "#msClass.updateLog(#request.getId())", msClass = AuthSourceLogService.class)
public AuthSource updateStatus(@Validated @RequestBody AuthSourceStatusRequest request) {
@ -90,14 +90,14 @@ public class AuthSourceController {
@PostMapping("/ldap/test-connect")
@Operation(summary = "ldap测试连接")
@Operation(summary = "系统设置-认证设置-ldap测试连接")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_AUTH_READ_UPDATE)
public void ldapTestConnect(@Validated @RequestBody LdapRequest request) {
ldapService.testConnect(request);
}
@PostMapping("/ldap/test-login")
@Operation(summary = "ldap测试登录")
@Operation(summary = "系统设置-认证设置-ldap测试登录")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_AUTH_READ_UPDATE)
public void testLogin(@RequestBody LdapLoginRequest request) {
ldapService.testLogin(request);

View File

@ -20,26 +20,26 @@ public class BaseDisplayController {
private BaseDisplayService baseDisplayService;
@Operation(summary = "获取icon图片")
@Operation(summary = "首页-获取icon图片")
@GetMapping("/get/icon")
public ResponseEntity<byte[]> getIcon() throws IOException {
return baseDisplayService.getFile("icon");
}
@Operation(summary = "获取loginImage图片")
@Operation(summary = "首页-获取loginImage图片")
@GetMapping("/get/login-image")
public ResponseEntity<byte[]> getLoginImage() throws IOException {
return baseDisplayService.getFile("loginImage");
}
@Operation(summary = "获取loginLogo图片")
@Operation(summary = "首页-获取loginLogo图片")
@GetMapping("/get/login-logo")
public ResponseEntity<byte[]> getLoginLogo() throws IOException {
return baseDisplayService.getFile("loginLogo");
}
@Operation(summary = "获取logoPlatform图片")
@Operation(summary = "首页-获取logoPlatform图片")
@GetMapping("/get/logo-platform")
public ResponseEntity<byte[]> getLogoPlatform() throws IOException {
return baseDisplayService.getFile("logoPlatform");

View File

@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
@Tag(name = "系统日志")
@Tag(name = "系统设置-系统-日志")
@RestController
@RequestMapping("/operation/log")
public class OperationLogController {
@ -44,7 +44,7 @@ public class OperationLogController {
@GetMapping("/get/options")
@Operation(summary = "获取组织/项目级联下拉框选项")
@Operation(summary = "系统-日志-获取组织/项目级联下拉框选项")
@RequiresPermissions(PermissionConstants.SYSTEM_LOG_READ)
public OrganizationProjectOptionsResponse getOptions() {
@ -62,7 +62,7 @@ public class OperationLogController {
@PostMapping("/list")
@Operation(summary = "系统操作日志列表查询")
@Operation(summary = "系统-日志-系统操作日志列表查询")
@RequiresPermissions(PermissionConstants.SYSTEM_LOG_READ)
public Pager<List<OperationLogResponse>> list(@Validated @RequestBody OperationLogRequest request) {
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),
@ -72,7 +72,7 @@ public class OperationLogController {
@GetMapping("/user/list")
@Operation(summary = "系统日志页面,获取用户列表")
@Operation(summary = "系统-日志-系统日志页面,获取用户列表")
@RequiresPermissions(PermissionConstants.SYSTEM_LOG_READ)
public List<User> getUserList() {
List<User> userList = userService.getUserList();

View File

@ -31,7 +31,7 @@ import java.util.List;
/**
* @author wx
*/
@Tag(name = "组织日志")
@Tag(name = "系统设置-组织-日志")
@RestController
@RequestMapping("/organization/log")
public class OrganizationLogController {
@ -47,7 +47,7 @@ public class OrganizationLogController {
@GetMapping("/get/options/{organizationId}")
@Operation(summary = "组织日志-获取项目级联下拉框选项")
@Operation(summary = "组织-日志-获取项目级联下拉框选项")
@RequiresPermissions(PermissionConstants.ORGANIZATION_LOG_READ)
public OrganizationProjectOptionsResponse getOrganizationOptions(@PathVariable(value = "organizationId") String organizationId) {
//获取全部项目
@ -60,7 +60,7 @@ public class OrganizationLogController {
@GetMapping("/user/list/{organizationId}")
@Operation(summary = "组织日志-获取用户列表")
@Operation(summary = "组织-日志-获取用户列表")
@RequiresPermissions(PermissionConstants.ORGANIZATION_LOG_READ)
public List<User> getLogUserList(@PathVariable(value = "organizationId") String organizationId) {
return userService.getUserListByOrgId(organizationId);
@ -68,7 +68,7 @@ public class OrganizationLogController {
@PostMapping("/list")
@Operation(summary = "组织菜单下操作日志列表查询")
@Operation(summary = "组织-日志-组织菜单下操作日志列表查询")
@RequiresPermissions(PermissionConstants.ORGANIZATION_LOG_READ)
public Pager<List<OperationLogResponse>> organizationLogList(@Validated @RequestBody OperationLogRequest request) {
Page<Object> page = PageHelper.startPage(request.getCurrent(), request.getPageSize(),

View File

@ -28,7 +28,7 @@ public class SystemParameterController {
@PostMapping("/save/base-info")
@Operation(summary = "保存基本信息")
@Operation(summary = "系统参数-基础设置-基本信息-保存")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_BASE_READ_UPDATE)
@Log(type = OperationLogType.UPDATE, expression = "#msClass.updateBaseLog(#systemParameter)", msClass = SystemParameterService.class)
public void saveBaseParameter(@Validated @RequestBody List<SystemParameter> systemParameter) {
@ -37,7 +37,7 @@ public class SystemParameterController {
@GetMapping("/get/base-info")
@Operation(summary = "获取基本信息")
@Operation(summary = "系统参数-基本设置-基本信息-获取")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_BASE_READ)
public BaseSystemConfigDTO getBaseInfo() {
return systemParameterService.getBaseInfo();
@ -45,7 +45,7 @@ public class SystemParameterController {
@GetMapping("/get/email-info")
@Operation(summary = "获取邮件信息")
@Operation(summary = "系统参数-基本设置-邮件设置-获取邮件信息")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_BASE_READ)
public EMailInfoDto getEmailInfo() {
return systemParameterService.getEmailInfo();
@ -53,7 +53,7 @@ public class SystemParameterController {
@PostMapping("/edit/email-info")
@Operation(summary = "保存邮件信息")
@Operation(summary = "系统参数-基本设置-邮件设置-保存邮件信息")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_BASE_READ_UPDATE)
@Log(type = OperationLogType.UPDATE, expression = "#msClass.updateLog(#systemParameter)", msClass = SystemParameterService.class)
public void editEMailInfo(@Validated @RequestBody List<SystemParameter> systemParameter) {
@ -62,7 +62,7 @@ public class SystemParameterController {
@PostMapping("/test/email")
@Operation(summary = "测试连接")
@Operation(summary = "系统参数-基本设置-邮件设置-测试连接")
@RequiresPermissions(PermissionConstants.SYSTEM_PARAMETER_SETTING_BASE_READ)
public void testEmailConnection(@RequestBody HashMap<String, String> hashMap) {
systemParameterService.testEmailConnection(hashMap);
@ -70,6 +70,7 @@ public class SystemParameterController {
@GetMapping("/save/base-url")
@Operation(summary = "系统参数-默认站点替换接口")
public void saveBaseurl(@RequestParam("baseUrl") String baseUrl) {
systemParameterService.saveBaseUrl(baseUrl);
}