| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.sandu.common.domain.ResponseVO; |
| | | import com.sandu.common.file.FileToThumbnail; |
| | | import com.sandu.common.file.config.NovaFileConfig; |
| | | import com.sandu.common.object.BaseConditionVO; |
| | | import com.sandu.common.util.ResponseUtil; |
| | | import com.sandu.ximon.admin.newnova.param.NewNovaFileParam; |
| | |
| | | @RequestMapping("/v1/nova/file") |
| | | public class NewNovaFileController { |
| | | |
| | | private FileToThumbnail fileToThumbnail; |
| | | private NovaFileConfig fileConfig; |
| | | private PermissionConfig permissionConfig; |
| | | private final NewNovaFileService newNovaFileService; |
| | | |
| | |
| | | wrapper.like(NewNovaFile::getName, keyword); |
| | | } |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | return ResponseUtil.successPage(newNovaFileService.list(wrapper)); |
| | | List<NewNovaFile> list = newNovaFileService.list(wrapper); |
| | | list.forEach(file -> { |
| | | file.setFileUrl(fileConfig.getRealUrl() + file.getFileUrl()); |
| | | if (file.getScreenShot() != null) { |
| | | file.setScreenShot(fileConfig.getRealUrl() + file.getScreenShot()); |
| | | } |
| | | }); |
| | | return ResponseUtil.success(list); |
| | | } |
| | | |
| | | @PostMapping("/uploading") |