提交 37a6d1f9 作者: chenshiqiang

modify path

上级 f01b55d8
......@@ -78,7 +78,7 @@ class KnowledgeServiceImpl implements IKnowledgeService {
MultipartHttpServletRequest multipartRequest = WebUtils.getNativeRequest(httpServletRequest, MultipartHttpServletRequest.class);
MultipartFile file = multipartRequest.getFile("file");
Result<Knowledge> result = localFileService.upload(file,knowledge.getId());
Result<KnowFile> upload = localFileService.upload(file, knowledge.getId());
if (null == knowledge.getId()) {
knowledge.setId(codeGenerateUtil.geneIdNo(Constants.FINANCE, 8));
......@@ -86,13 +86,11 @@ class KnowledgeServiceImpl implements IKnowledgeService {
if (null == knowledge.getVerifyStatus()) {
knowledge.setVerifyStatus(0);
}
knowledge.setCreateTime(cn.hutool.core.date.DateUtil.formatDateTime(new Date()).replace(" ", "T"));
knowledge.setDeleteFlag(0);
List<KnowFile> knowFileList = new ArrayList<>();
knowFileList.add(KnowFile.builder()
.fileId(codeGenerateUtil.geneIdNo(Constants.FINANCE, 8))
.filePath("C:/bbb.docx")
.build());
knowFileList.add(upload.getResult());
knowledge.setFiles(knowFileList);
List<Content> contentList = new ArrayList<>();
List<String> contentStringList = new ArrayList<>();
......
......@@ -82,7 +82,7 @@ public class LocalFileServiceImpl implements ILocalFileService {
private String getFilePath(){
LocalDate currentDate = LocalDate.now();
//System.out.println("当前日期: " + currentDate);
String filePath = filesStorage + currentDate + "\\";
String filePath = filesStorage + currentDate + "/";
//判断文件夹是否存在,不存在创建
Path directory = Paths.get(filePath);
......
......@@ -50,7 +50,7 @@ know:
getusersurl: http://127.0.0.1:9988/sys/user/thirdparty
files:
storage: E:\\aaa\\
storage: E:/aaa/
docservice:
fillforms-docs: .docx|.oform
viewed-docs: .djvu|.oxps|.pdf|.xps
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论