| | |
| | | |
| | | @PostMapping("/add") |
| | | public ResponseVO<Object> addLEDProgram(@RequestParam("file") MultipartFile file) { |
| | | |
| | | if (!permissionConfig.check(MenuEnum.LED_FILE_S_ADD.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(ledProgramFileService.addProgramFile(file)); |
| | | // return ResponseUtil.success(aliOssFileService.uploadFile(file)); |
| | | } |
| | | |
| | | @PostMapping("/delete/{fileId}") |
| | | public ResponseVO<Object> deleteLEDProgram(@PathVariable Long fileId) { |
| | | if (!permissionConfig.check(MenuEnum.LED_FILE_S_DELETE.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | return ResponseUtil.success(ledProgramFileService.deleteFile(fileId)); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | public ResponseVO<Object> listfile(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) { |
| | | if (!permissionConfig.check(MenuEnum.LED_FILE_LIST.getCode())) { |
| | | if (!permissionConfig.check(MenuEnum.LED_FILE_S_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | LambdaQueryWrapper<LedSFile> wrapper = ledProgramFileService.listFile(); |
| | |
| | | return ResponseUtil.success(ledProgramFileService.list(wrapper)); |
| | | } |
| | | |
| | | @AnonymousAccess |
| | | @PostMapping("/uploading/{dateType}") |
| | | public ResponseVO<Object> uploadingFile(@RequestParam("file") MultipartFile file, @PathVariable Integer dateType) { |
| | | FileUploadDto fileUploadDto = aliOssFileService.uploadFile(file); |