rain
2024-07-08 aba5f5bf919b7023744dc70ea28d479656e07c9b
src/main/java/com/dji/sample/patches/service/impl/GetPatchesServiceImpl.java
@@ -1,7 +1,6 @@
package com.dji.sample.patches.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dji.sample.common.model.Pagination;
@@ -20,7 +19,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
@Service
@@ -97,20 +95,20 @@
    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));}
        else {
        if (statue==1){
            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));}
        else {
            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));}
    }