Browse Source

屏蔽接口

wangqifan 2 years ago
parent
commit
69ef2115cb
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/main/java/com/izouma/nineth/web/AirDropController.java

+ 3 - 0
src/main/java/com/izouma/nineth/web/AirDropController.java

@@ -32,11 +32,13 @@ public class AirDropController extends BaseController {
 
     //@PreAuthorize("hasRole('ADMIN')")
     @PostMapping("/all")
+    @PreAuthorize("hasAnyRole('ADMIN', 'SAAS')")
     public Page<AirDrop> all(@RequestBody PageQuery pageQuery) {
         return airDropService.all(pageQuery);
     }
 
     @GetMapping("/get/{id}")
+    @PreAuthorize("hasAnyRole('ADMIN', 'SAAS')")
     public AirDrop get(@PathVariable Long id) {
         return airDropRepo.findById(id).orElseThrow(new BusinessException("无记录"));
     }
@@ -47,6 +49,7 @@ public class AirDropController extends BaseController {
     }
 
     @GetMapping("/excel")
+    @PreAuthorize("hasAnyRole('ADMIN', 'SAAS')")
     @ResponseBody
     public void excel(HttpServletResponse response, PageQuery pageQuery) throws IOException {
         List<AirDrop> data = all(pageQuery).getContent();