package cn.lili.modules.lmk.service;
|
|
import cn.lili.base.Result;
|
import cn.lili.cos.CosSTS;
|
import cn.lili.modules.lmk.domain.entity.LmkFile;
|
import cn.lili.modules.lmk.domain.form.FileInfoForm;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
import org.springframework.web.multipart.MultipartFile;
|
|
import javax.servlet.http.HttpServletResponse;
|
import java.util.List;
|
|
/**
|
* 文件信息 服务类
|
*
|
* @author xp
|
* @since 2025-05-19
|
*/
|
public interface LmkFileService extends IService<LmkFile> {
|
|
/**
|
* 上传单个文件
|
*
|
* @param file
|
* @return
|
*/
|
Result uploadObject(MultipartFile file);
|
|
/**
|
* 上传多个文件
|
*
|
* @param files
|
* @return
|
*/
|
Result uploadObjects(List<MultipartFile> files);
|
|
/**
|
* 删除单个文件
|
*
|
* @param fileKey
|
* @return
|
*/
|
Result deleteObject(String fileKey);
|
|
/**
|
* 删除多个文件
|
*
|
* @param fileKeys
|
* @return
|
*/
|
Result deleteObjects(List<String> fileKeys);
|
|
/**
|
* 下载文件
|
*
|
* @param fileKey
|
* @param response
|
* @return
|
*/
|
void downloadObject(String fileKey, HttpServletResponse response);
|
|
/**
|
* 预览文件
|
*
|
* @param fileKey
|
* @return
|
*/
|
String getPreviewUrl(String fileKey);
|
|
/**
|
* 获取sts临时访问凭证
|
*
|
* @return
|
*/
|
CosSTS getSTSToken();
|
|
/**
|
* 保存文件信息
|
*
|
* @param fileInfo
|
*/
|
void addByForm(FileInfoForm fileInfo);
|
}
|