package org.eco.system.service;

import org.eco.system.domain.SysOss;
import org.eco.system.domain.bo.SysOssBo;
import org.eco.system.domain.vo.SysOssVo;
import org.eco.common.core.core.page.PageResult;
import org.eco.common.orm.core.service.IBaseService;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Collection;
import java.util.List;

/**
 * 文件上传 服务层
 *
 * @author wgk
 */
public interface ISysOssService extends IBaseService<SysOss> {

    PageResult<SysOssVo> queryPageList(SysOssBo sysOss);

    List<SysOssVo> listSysOssByIds(Collection<Long> ossIds);

    SysOssVo getById(Long ossId);

    SysOssVo upload(MultipartFile file);

    SysOssVo upload(File file);

    void download(Long ossId, HttpServletResponse response) throws IOException;

    InputStream getFileStream(Long ossId);

    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
    SysOssVo saveResultEntity(String originalFileName, String suffix, String url, String fileName);
}
