rain
2024-06-03 28f661933ffdeb1f65ecee52f8f4b7a3b373da9b
src/main/java/com/dji/sample/patches/service/impl/GetPatchesServiceImpl.java
@@ -12,6 +12,8 @@
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;
@@ -30,14 +32,28 @@
     */
    @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