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