| | |
| | | package com.dji.sample.patches.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | 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.model.MediaFileEntity; |
| | | import com.dji.sample.patches.dao.GetPatchesMapper; |
| | | import com.dji.sample.patches.model.Param.PatchesParam; |
| | | import com.dji.sample.patches.model.entity.LotInfo; |
| | |
| | | public class GetPatchesServiceImpl implements GetPatchesService { |
| | | @Autowired |
| | | private GetPatchesMapper mapper; |
| | | @Autowired |
| | | private IFileMapper fileMapper; |
| | | |
| | | @Override |
| | | public PaginationData<LotInfo> limitGet(PatchesParam param) { |
| | |
| | | return new PaginationData<LotInfo>(records, new Pagination(page)); |
| | | } |
| | | |
| | | @Override |
| | | public void delPatches() { |
| | | mapper.delete(null); |
| | | } |
| | | |
| | | @Override |
| | | public PaginationData<MediaFileEntity> getPhoto(PatchesParam param,String dkbh) { |
| | | 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)); |
| | | } |
| | | } |