refactor(system): 优化系统模块接口定义
- 将 ConfigController 中的 refreshCache 方法和 NoticeController 中的 publishNotice 和 revokeNotice 方法的注解从 @RequestMapping 修改为 @PutMapping - 这样做可以更明确地指定 HTTP 请求方法,提高代码可读性和维护性
This commit is contained in:
@@ -57,7 +57,7 @@ public class ConfigController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "刷新系统配置缓存")
|
@Operation(summary = "刷新系统配置缓存")
|
||||||
@RequestMapping(value = "/refresh", method = {RequestMethod.PUT,RequestMethod.PATCH})
|
@PutMapping("/refresh")
|
||||||
@PreAuthorize("@ss.hasPerm('sys:config:refresh')")
|
@PreAuthorize("@ss.hasPerm('sys:config:refresh')")
|
||||||
public Result<ConfigForm> refreshCache() {
|
public Result<ConfigForm> refreshCache() {
|
||||||
return Result.judge(configService.refreshCache());
|
return Result.judge(configService.refreshCache());
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class NoticeController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "发布通知公告")
|
@Operation(summary = "发布通知公告")
|
||||||
@RequestMapping(value="/{id}/publish",method = {RequestMethod.PUT,RequestMethod.PATCH})
|
@PutMapping("/{id}/publish")
|
||||||
@PreAuthorize("@ss.hasPerm('sys:notice:publish')")
|
@PreAuthorize("@ss.hasPerm('sys:notice:publish')")
|
||||||
public Result<Void> publishNotice(
|
public Result<Void> publishNotice(
|
||||||
@Parameter(description = "通知公告ID") @PathVariable Long id
|
@Parameter(description = "通知公告ID") @PathVariable Long id
|
||||||
@@ -93,7 +93,7 @@ public class NoticeController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "撤回通知公告")
|
@Operation(summary = "撤回通知公告")
|
||||||
@RequestMapping(value="/{id}/revoke",method = {RequestMethod.PUT,RequestMethod.PATCH})
|
@PutMapping("/{id}/revoke")
|
||||||
@PreAuthorize("@ss.hasPerm('sys:notice:revoke')")
|
@PreAuthorize("@ss.hasPerm('sys:notice:revoke')")
|
||||||
public Result<Void> revokeNotice(
|
public Result<Void> revokeNotice(
|
||||||
@Parameter(description = "通知公告ID") @PathVariable Long id
|
@Parameter(description = "通知公告ID") @PathVariable Long id
|
||||||
|
|||||||
Reference in New Issue
Block a user