⚡ 优化swagger注解配置
This commit is contained in:
parent
6529ac5b03
commit
7e6b9f0abc
|
|
@ -54,11 +54,11 @@ public class AuthController {
|
|||
|
||||
@PostMapping("token")
|
||||
@Operation(summary = "获取认证token", description = "传入租户ID:tenantId,账号:account,密码:password")
|
||||
public R<AuthInfo> token(@Parameter(name = "授权类型", required = true) @RequestParam(defaultValue = "password", required = false) String grantType,
|
||||
@Parameter(name = "刷新令牌") @RequestParam(required = false) String refreshToken,
|
||||
@Parameter(name = "租户ID", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantId,
|
||||
@Parameter(name = "账号") @RequestParam(required = false) String account,
|
||||
@Parameter(name = "密码") @RequestParam(required = false) String password) {
|
||||
public R<AuthInfo> token(@Parameter(description = "授权类型", required = true) @RequestParam(defaultValue = "password", required = false) String grantType,
|
||||
@Parameter(description = "刷新令牌") @RequestParam(required = false) String refreshToken,
|
||||
@Parameter(description = "租户ID", required = true) @RequestParam(defaultValue = "000000", required = false) String tenantId,
|
||||
@Parameter(description = "账号") @RequestParam(required = false) String account,
|
||||
@Parameter(description = "密码") @RequestParam(required = false) String password) {
|
||||
|
||||
String userType = Func.toStr(WebUtil.getRequest().getHeader(TokenUtil.USER_TYPE_HEADER_KEY), TokenUtil.DEFAULT_USER_TYPE);
|
||||
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public class CodeController extends BladeController {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(codeService.removeByIds(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +113,7 @@ public class CodeController extends BladeController {
|
|||
@PostMapping("/copy")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "复制", description = "传入id")
|
||||
public R copy(@Parameter(name = "主键", required = true) @RequestParam Long id) {
|
||||
public R copy(@Parameter(description = "主键", required = true) @RequestParam Long id) {
|
||||
Code code = codeService.getById(id);
|
||||
code.setId(null);
|
||||
code.setCodeName(code.getCodeName() + "-copy");
|
||||
|
|
@ -126,7 +126,7 @@ public class CodeController extends BladeController {
|
|||
@PostMapping("/gen-code")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "代码生成", description = "传入ids")
|
||||
public R genCode(@Parameter(name = "主键集合", required = true) @RequestParam String ids, @RequestParam(defaultValue = "sword") String system) {
|
||||
public R genCode(@Parameter(description = "主键集合", required = true) @RequestParam String ids, @RequestParam(defaultValue = "sword") String system) {
|
||||
Collection<Code> codes = codeService.listByIds(Func.toLongList(ids));
|
||||
codes.forEach(code -> {
|
||||
BladeCodeGenerator generator = new BladeCodeGenerator();
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public class DatasourceController extends BladeController {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(datasourceService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ public class $!{table.controllerName} {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
@ -171,7 +171,7 @@ public class $!{table.controllerName} {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ public class $!{table.controllerName} {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
@ -171,7 +171,7 @@ public class $!{table.controllerName} {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public class NoticeController extends BladeController implements CacheNames {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "逻辑删除", description = "传入notice")
|
||||
public R remove(@Parameter(name = "主键集合") @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合") @RequestParam String ids) {
|
||||
boolean temp = noticeService.deleteLogic(Func.toLongList(ids));
|
||||
return R.status(temp);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ public class NoticeController extends BladeController implements CacheNames {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "逻辑删除", description = "传入notice")
|
||||
public R remove(@Parameter(name = "主键集合") @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合") @RequestParam String ids) {
|
||||
boolean temp = noticeService.deleteLogic(Func.toLongList(ids));
|
||||
return R.status(temp);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public class AuthClientController extends BladeController {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(clientService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ public class DataScopeController extends BladeController {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
CacheUtil.clear(SYS_CACHE);
|
||||
return R.status(dataScopeService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ public class DeptController extends BladeController {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(deptService.removeByIds(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public class DictController extends BladeController {
|
|||
@CacheEvict(cacheNames = {DICT_LIST, DICT_VALUE}, allEntries = true)
|
||||
@ApiOperationSupport(order = 5)
|
||||
@Operation(summary = "删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(dictService.removeByIds(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ public class MenuController extends BladeController {
|
|||
@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(menuService.removeByIds(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ public class ParamController extends BladeController {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 4)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(paramService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public class PostController extends BladeController {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(postService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ public class RegionController extends BladeController {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "删除", description = "传入主键")
|
||||
public R remove(@Parameter(name = "主键", required = true) @RequestParam String id) {
|
||||
public R remove(@Parameter(description = "主键", required = true) @RequestParam String id) {
|
||||
return R.status(regionService.removeRegion(id));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ public class RoleController extends BladeController {
|
|||
@PostMapping("/remove")
|
||||
@ApiOperationSupport(order = 6)
|
||||
@Operation(summary = "删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
CacheUtil.clear(SYS_CACHE);
|
||||
return R.status(roleService.removeByIds(Func.toLongList(ids)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ public class TenantController extends BladeController {
|
|||
*/
|
||||
@PostMapping("/remove")
|
||||
@Operation(summary = "逻辑删除", description = "传入ids")
|
||||
public R remove(@Parameter(name = "主键集合", required = true) @RequestParam String ids) {
|
||||
public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
|
||||
return R.status(tenantService.deleteLogic(Func.toLongList(ids)));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,8 +149,8 @@ public class UserController {
|
|||
@PostMapping("/grant")
|
||||
@ApiOperationSupport(order = 7)
|
||||
@Operation(summary = "权限设置", description = "传入roleId集合以及menuId集合")
|
||||
public R grant(@Parameter(name = "userId集合", required = true) @RequestParam String userIds,
|
||||
@Parameter(name = "roleId集合", required = true) @RequestParam String roleIds) {
|
||||
public R grant(@Parameter(description = "userId集合", required = true) @RequestParam String userIds,
|
||||
@Parameter(description = "roleId集合", required = true) @RequestParam String roleIds) {
|
||||
boolean temp = userService.grant(userIds, roleIds);
|
||||
return R.status(temp);
|
||||
}
|
||||
|
|
@ -158,7 +158,7 @@ public class UserController {
|
|||
@PostMapping("/reset-password")
|
||||
@ApiOperationSupport(order = 8)
|
||||
@Operation(summary = "初始化密码", description = "传入userId集合")
|
||||
public R resetPassword(@Parameter(name = "userId集合", required = true) @RequestParam String userIds) {
|
||||
public R resetPassword(@Parameter(description = "userId集合", required = true) @RequestParam String userIds) {
|
||||
boolean temp = userService.resetPassword(userIds);
|
||||
return R.status(temp);
|
||||
}
|
||||
|
|
@ -174,9 +174,9 @@ public class UserController {
|
|||
@PostMapping("/update-password")
|
||||
@ApiOperationSupport(order = 9)
|
||||
@Operation(summary = "修改密码", description = "传入密码")
|
||||
public R updatePassword(BladeUser user, @Parameter(name = "旧密码", required = true) @RequestParam String oldPassword,
|
||||
@Parameter(name = "新密码", required = true) @RequestParam String newPassword,
|
||||
@Parameter(name = "新密码", required = true) @RequestParam String newPassword1) {
|
||||
public R updatePassword(BladeUser user, @Parameter(description = "旧密码", required = true) @RequestParam String oldPassword,
|
||||
@Parameter(description = "新密码", required = true) @RequestParam String newPassword,
|
||||
@Parameter(description = "新密码", required = true) @RequestParam String newPassword1) {
|
||||
boolean temp = userService.updatePassword(user.getUserId(), oldPassword, newPassword, newPassword1);
|
||||
return R.status(temp);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user