| | |
| | | import com.dji.sample.common.model.PaginationData; |
| | | import com.dji.sample.patches.dao.GetPatchesMapper; |
| | | import com.dji.sample.patches.model.Param.PatchesParam; |
| | | import com.dji.sample.patches.model.entity.PatchesEntity; |
| | | import com.dji.sample.patches.model.entity.LotInfo; |
| | | import com.dji.sample.patches.service.GetPatchesService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private GetPatchesMapper mapper; |
| | | |
| | | @Override |
| | | public PaginationData<PatchesEntity> limitGet(PatchesParam param) { |
| | | Page<PatchesEntity> page = mapper.selectPage(new Page<PatchesEntity>(param.getPage(), param.getPageSize()), null); |
| | | List<PatchesEntity> records = page.getRecords() |
| | | public PaginationData<LotInfo> limitGet(PatchesParam param) { |
| | | Page<LotInfo> page = mapper.selectPage(new Page<LotInfo>(param.getPage(), param.getPageSize()), null); |
| | | List<LotInfo> records = page.getRecords() |
| | | .stream() |
| | | .collect(Collectors.toList()); |
| | | return new PaginationData<PatchesEntity>(records, new Pagination(page)); |
| | | return new PaginationData<LotInfo>(records, new Pagination(page)); |
| | | } |
| | | |
| | | } |