package org.jeecg.modules.wps.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.wps.dto.FileListDTO;
import org.jeecg.modules.wps.dto.FileReqDTO;
import org.jeecg.modules.wps.entity.WpsFile;
import org.jeecg.modules.wps.util.Token;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * wps文件
 * @author jeecg-boot
 * @date   2020-06-01
 * @version V1.0
 */
public interface IWpsFileService extends IService<WpsFile> {

    Map<String, Object> getFileInfo(String w_userid, String w_filepath, String w_filetype);

    Map<String, Object> fileSave(MultipartFile file, String w_userid);

    Map<String, Object> fileVersion(Integer version);

    void fileRename(String name, String w_userid);

    Map<String, Object> fileHistory(FileReqDTO req);

    Map<String, Object> fileNew(MultipartFile file, String w_userid);

    Token getViewUrl(String fileUrl, boolean b);

    Token getViewUrl(String fileUrl, String userId,boolean b);

    List<FileListDTO> getFileList();

    Map<String,Object> getFileListByPage(int pageNum,int pageSize);

    int delFile(String id);

    void uploadFile(MultipartFile file);

    String createTemplateFile(String template);
}
