fix 项目管理-shangchuan
This commit is contained in:
parent
e77cd63ae0
commit
e6e997b179
|
|
@ -0,0 +1,11 @@
|
|||
package com.chushang.oss.entity.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class FileVo {
|
||||
private String fid;
|
||||
private String mimeType;
|
||||
private String realPath;
|
||||
private String fileName;
|
||||
}
|
||||
|
|
@ -23,6 +23,7 @@ import com.chushang.oss.config.UploadConfig;
|
|||
import com.chushang.oss.entity.FileSourceInfo;
|
||||
import com.chushang.oss.entity.dto.OcrDTO;
|
||||
import com.chushang.oss.entity.vo.FileSourceVo;
|
||||
import com.chushang.oss.entity.vo.FileVo;
|
||||
import com.chushang.oss.enums.OcrTypeEnum;
|
||||
import com.chushang.oss.mapper.FileSourceMapper;
|
||||
import com.chushang.security.utils.SecurityUtils;
|
||||
|
|
@ -253,7 +254,7 @@ public class FileSourceService
|
|||
return upload;
|
||||
}
|
||||
|
||||
public String uploadContract(MultipartFile file) throws Exception
|
||||
public FileVo uploadContract(MultipartFile file) throws Exception
|
||||
{
|
||||
String ip = IPUtils.clientIp(ServletUtils.getRequest());
|
||||
String fid = generateFid();
|
||||
|
|
@ -284,7 +285,12 @@ public class FileSourceService
|
|||
String upload = ossService.upload(file.getInputStream(), fileSourceInfo);
|
||||
fileSourceInfo.setRealPath(upload);
|
||||
save(fileSourceInfo);
|
||||
return upload;
|
||||
FileVo fileVo = new FileVo();
|
||||
fileVo.setRealPath(upload);
|
||||
fileVo.setFid(fid);
|
||||
fileVo.setMimeType(mimetype);
|
||||
fileVo.setFileName(fName);
|
||||
return fileVo;
|
||||
}
|
||||
|
||||
public FileSourceVo addFile(byte[] bytes, String fileName, Boolean sealFlag, String formats, String fileType)
|
||||
|
|
|
|||
Loading…
Reference in New Issue