| ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/NoticesController.java ÐÞ¸Ä |
| | |
| | | @Api(tags = "ç³»ç»æ¶æ¯ä¿¡æ¯è¡¨") |
| | | @RestController |
| | | @RequestMapping("/cloudService/business/notices") |
| | | public class NoticesController extends BaseController { |
| | | |
| | | public class NoticesCloudController extends BaseController { |
| | | @Autowired |
| | | private NoticesService noticesService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | |
| | | public ApiResponse create(@RequestBody Notices notices) { |
| | | return ApiResponse.success(noticesService.create(notices)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:notices:delete") |
| | |
| | | noticesService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:notices:delete") |
| | |
| | | noticesService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:notices:update") |
| | |
| | | noticesService.updateById(notices); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:notices:query") |
| | |
| | | pageWrap.getModel().setPalt(Constants.ZERO); |
| | | return ApiResponse.success(noticesService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:notices:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Notices> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Notices.class).export(noticesService.findPage(pageWrap).getRecords(), "ç³»ç»æ¶æ¯ä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:notices:query") |