|
|
@@ -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();
|