mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 12:18:42 +08:00 
			
		
		
		
	合并fetch代码
This commit is contained in:
		@@ -19,8 +19,8 @@ public class FileApiImpl implements FileApi {
 | 
			
		||||
    private FileService fileService;
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public String createFile(String name, String path, String mimeType, byte[] content) {
 | 
			
		||||
        return fileService.createFile(name, path, mimeType, content);
 | 
			
		||||
    public String createFile(String name, String path, byte[] content) {
 | 
			
		||||
        return fileService.createFile(name, path, content);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,7 @@ public class FileController {
 | 
			
		||||
    @OperateLog(logArgs = false) // 上传文件,没有记录操作日志的必要
 | 
			
		||||
    public CommonResult<String> uploadFile(@RequestParam("file") MultipartFile file,
 | 
			
		||||
                                           @RequestParam(value = "path", required = false) String path) throws Exception {
 | 
			
		||||
        return success(fileService.createFile(file.getOriginalFilename(), path, file.getContentType(), IoUtil.readBytes(file.getInputStream())));
 | 
			
		||||
        return success(fileService.createFile(file.getOriginalFilename(), path, IoUtil.readBytes(file.getInputStream())));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @DeleteMapping("/delete")
 | 
			
		||||
 
 | 
			
		||||
@@ -38,16 +38,15 @@ public class FileDO extends BaseDO {
 | 
			
		||||
     */
 | 
			
		||||
    private String name;
 | 
			
		||||
    /**
 | 
			
		||||
     * 路径,即文件名,唯一不可重复
 | 
			
		||||
     * 路径,即文件名
 | 
			
		||||
     */
 | 
			
		||||
    private String path;
 | 
			
		||||
    /**
 | 
			
		||||
     * 访问地址
 | 
			
		||||
     */
 | 
			
		||||
    private String url;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 文件的MIME类型,默认为"application/octet-stream"
 | 
			
		||||
     * 文件的MIME类型,例如"application/octet-stream"
 | 
			
		||||
     */
 | 
			
		||||
    private String type;
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -24,11 +24,10 @@ public interface FileService {
 | 
			
		||||
     *
 | 
			
		||||
     * @param name 文件名称
 | 
			
		||||
     * @param path 文件路径
 | 
			
		||||
     * @param mimeType 文件MIME类型
 | 
			
		||||
     * @param content 文件内容
 | 
			
		||||
     * @return 文件路径
 | 
			
		||||
     */
 | 
			
		||||
    String createFile(String name, String path, String mimeType,byte[] content);
 | 
			
		||||
    String createFile(String name, String path, byte[] content);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除文件
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user