| | |
| | | import com.dji.sample.common.model.Pagination; |
| | | import com.dji.sample.common.model.PaginationData; |
| | | import com.dji.sample.media.dao.IFileMapper; |
| | | import com.dji.sample.media.dao.IMarkMapper; |
| | | import com.dji.sample.media.model.MediaFileEntity; |
| | | import com.dji.sample.media.model.MediaFileMarkEntity; |
| | | import com.dji.sample.patches.dao.GetPatchesMapper; |
| | | import com.dji.sample.patches.model.Param.PatchesParam; |
| | | import com.dji.sample.patches.model.entity.LotInfo; |
| | |
| | | private GetPatchesMapper mapper; |
| | | @Autowired |
| | | private IFileMapper fileMapper; |
| | | @Autowired |
| | | private IMarkMapper markMapper; |
| | | |
| | | /** |
| | | * 分页获取数据的接口实现。 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public PaginationData<MediaFileEntity> getPhoto(PatchesParam param, String dkbh) { |
| | | public PaginationData getPhoto(PatchesParam param, String dkbh) { |
| | | LotInfo lotInfo=getLotinfoToDb(dkbh); |
| | | int statue=lotInfo.getIsPush(); |
| | | if (statue==0){ |
| | | Page<MediaFileEntity> page = fileMapper.selectPage(new Page<MediaFileEntity>(param.getPage(), param.getPageSize()), |
| | | new LambdaQueryWrapper<MediaFileEntity>().like(MediaFileEntity::getFileName, "%" + dkbh + "~" + "%")); |
| | | List<MediaFileEntity> records = page.getRecords() |
| | | .stream() |
| | | .collect(Collectors.toList()); |
| | | return new PaginationData<MediaFileEntity>(records, new Pagination(page)); |
| | | return new PaginationData<MediaFileEntity>(records, new Pagination(page));} |
| | | else { |
| | | Page<MediaFileMarkEntity> page = markMapper.selectPage(new Page<MediaFileMarkEntity>(param.getPage(), param.getPageSize()), |
| | | new LambdaQueryWrapper<MediaFileMarkEntity>().like(MediaFileMarkEntity::getFileName, "%" + dkbh + "~" + "%")); |
| | | List<MediaFileMarkEntity> records = page.getRecords() |
| | | .stream() |
| | | .collect(Collectors.toList()); |
| | | return new PaginationData<MediaFileMarkEntity>(records, new Pagination(page));} |
| | | |
| | | } |
| | | |
| | | public List<MediaFileEntity> listPohto(String dkbh, String workspaceId) { |