package com.sckw.file.api.dubbo;

import com.sckw.core.model.file.FileInfo;
import com.sckw.core.web.response.HttpResult;
import com.sckw.file.api.dto.FileInfoDTO;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;
import java.text.ParseException;

/**
 * @author lfdc
 * @version 1.0
 * @className FileApiDubboService
 * @description fileDubbo服务
 * @company sckw
 * @date 2023-06-06 10:06:27
 */
public interface FileApiDubboService {

    /**
     * 文件上传
     * @param str
     * @param fileByte
     * @return
     */
    HttpResult fileUpload(String str, byte[] fileByte);

    /**
     * dubbo方式上传
     * @param file
     * @return
     */
    HttpResult fileUploadTodubbo(MultipartFile file);

    /**
     * 查询数据
     * @return
     */
    HttpResult selectAll();

    /**
     * dubbo 文件调用
     * @param inputStream
     * @param fileInfo
     * @return
     */
    HttpResult fileDubboUpload(InputStream inputStream, FileInfoDTO fileInfo);

    /**
     * dubbo保存信息
     * @param fileInfo
     * @return
     */
    HttpResult fileInfoInsert(FileInfo fileInfo) throws ParseException;
}
