| | |
| | | import com.dji.sample.patches.service.GetPatchesService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public PaginationData<LotInfo> limitGet(PatchesParam param) { |
| | | Page<LotInfo> page = mapper.selectPage(new Page<LotInfo>(param.getPage(), param.getPageSize()), |
| | | new LambdaQueryWrapper<LotInfo>() |
| | | .eq(LotInfo::getWorkspaceId, param.getWorkspaceId()) |
| | | .like(LotInfo::getDkbh,param.getDkbh())); |
| | | List<LotInfo> records = page.getRecords() |
| | | .stream() |
| | | .collect(Collectors.toList()); |
| | | return new PaginationData<LotInfo>(records, new Pagination(page)); |
| | | if (param.getIsPlan() != null) { |
| | | Page<LotInfo> page = mapper.selectPage(new Page<LotInfo>(param.getPage(), param.getPageSize()), |
| | | new LambdaQueryWrapper<LotInfo>() |
| | | .eq(LotInfo::getWorkspaceId, param.getWorkspaceId()) |
| | | .like(LotInfo::getDkbh, param.getDkbh()) |
| | | .like(LotInfo::getXzqdm, param.getXzqdm()) |
| | | .eq(LotInfo::getIsPlan, param.getIsPlan())); |
| | | List<LotInfo> records = page.getRecords() |
| | | .stream() |
| | | .collect(Collectors.toList()); |
| | | return new PaginationData<LotInfo>(records, new Pagination(page)); |
| | | } else { |
| | | Page<LotInfo> page = mapper.selectPage(new Page<LotInfo>(param.getPage(), param.getPageSize()), |
| | | new LambdaQueryWrapper<LotInfo>() |
| | | .eq(LotInfo::getWorkspaceId, param.getWorkspaceId()) |
| | | .like(LotInfo::getDkbh, param.getDkbh()) |
| | | .like(LotInfo::getXzqdm, param.getXzqdm())); |
| | | List<LotInfo> records = page.getRecords() |
| | | .stream() |
| | | .collect(Collectors.toList()); |
| | | return new PaginationData<LotInfo>(records, new Pagination(page)); |
| | | } |
| | | } |
| | | |
| | | @Override |