package cn.wisenergy.service.app;


import org.springframework.core.io.Resource;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * Created by m1991 on 2021/2/24 13:49
 * TODO 资讯Service
 * @author 86187
 */
public interface UploadService {
    /**
     * TODO 视频文件上传   zxUrl, userId,zxName,zxField,imgUrl
     * @param request
     * @return
     */
     Map<String, Object> uploadVideo(MultipartFile file,HttpServletRequest request,String userId,String zxField,String zxAddress) throws Exception;

    /**
     * TODO 图片文件上传
     * @param request
     * @return
     */
     Map<String, Object> uploadImage(MultipartFile file, HttpServletRequest request,String userId,String zxField,String zxAddress) throws Exception;

    /**
     * TODO 项目目录下的图片文件上传
     * @param request
     * @return
     */
     Map<String, Object> getImageUrl(HttpServletRequest request) throws Exception;

    /**
     * TODO 多文件上传
     * @param file
     * @return
     */
     List imageUpload( MultipartFile[] file,String userId, String zxField, String zxAddress);
     String storeFile(MultipartFile file);
     Resource loadFileAsResource(String fileName);

    /**
     * 查询资讯所有信息（分页——10条信息一页）
     * @param
     * @return
     */
//      List<shopZx> getList();



}
