|
|
|
@ -6,13 +6,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.ruoyi.common.core.constant.CacheNames;
|
|
|
|
|
import com.ruoyi.common.mybatis.core.page.PageQuery;
|
|
|
|
|
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
|
|
|
|
|
import com.ruoyi.common.core.exception.ServiceException;
|
|
|
|
|
import com.ruoyi.common.core.utils.BeanCopyUtils;
|
|
|
|
|
import com.ruoyi.common.core.utils.SpringUtils;
|
|
|
|
|
import com.ruoyi.common.core.utils.StreamUtils;
|
|
|
|
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
|
|
|
import com.ruoyi.common.core.utils.file.FileUtils;
|
|
|
|
|
import com.ruoyi.common.core.utils.SpringUtils;
|
|
|
|
|
import com.ruoyi.common.mybatis.core.page.PageQuery;
|
|
|
|
|
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
|
|
|
|
|
import com.ruoyi.common.oss.core.OssClient;
|
|
|
|
|
import com.ruoyi.common.oss.entity.UploadResult;
|
|
|
|
|
import com.ruoyi.common.oss.enumd.AccessPolicyType;
|
|
|
|
@ -22,20 +23,19 @@ import com.ruoyi.system.domain.bo.SysOssBo;
|
|
|
|
|
import com.ruoyi.system.domain.vo.SysOssVo;
|
|
|
|
|
import com.ruoyi.system.mapper.SysOssMapper;
|
|
|
|
|
import com.ruoyi.system.service.ISysOssService;
|
|
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
|
|
import org.springframework.http.MediaType;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
|
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.io.InputStream;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Collection;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 文件上传 服务层实现
|
|
|
|
@ -52,7 +52,7 @@ public class SysOssServiceImpl implements ISysOssService {
|
|
|
|
|
public TableDataInfo<SysOssVo> queryPageList(SysOssBo bo, PageQuery pageQuery) {
|
|
|
|
|
LambdaQueryWrapper<SysOss> lqw = buildQueryWrapper(bo);
|
|
|
|
|
Page<SysOssVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
|
|
|
List<SysOssVo> filterResult = result.getRecords().stream().map(this::matchingUrl).toList();
|
|
|
|
|
List<SysOssVo> filterResult = StreamUtils.toList(result.getRecords(), this::matchingUrl);
|
|
|
|
|
result.setRecords(filterResult);
|
|
|
|
|
return TableDataInfo.build(result);
|
|
|
|
|
}
|
|
|
|
|