feat: 在线编辑历史记录列表

This commit is contained in:
2024-01-24 09:56:06 +08:00
parent c24d05472b
commit 7a26906b09
3 changed files with 5 additions and 5 deletions
@@ -347,6 +347,7 @@ public class OnlyOfficeController {
for (OnlineFileLog onlineFileLog : onlineFileLogList) {
Map<String, String> map = new HashMap<>();
map.put("id", onlineFileLog.getId());
map.put("filePath", onlineFileLog.getFilePath());
map.put("fileName", fileName);
map.put("attFileId", onlineFileLog.getAttFileId());
map.put("createTime", sdf.format(onlineFileLog.getCreateTime()));
@@ -110,6 +110,7 @@ public class LawsUserInfoService {
onlineFileLog.setFileName(String.valueOf(time));
onlineFileLog.setValidFlag("0");
onlineFileLog.setFileKey(key);
onlineFileLog.setFilePath(fileUrl);
onlineFileLogDao.insert(onlineFileLog);
log.info("======================日志存入成功===============================");
if (StringUtils.isNotBlank(standName)) {
@@ -2,7 +2,6 @@ package com.jero.modules.onlyoffice.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jero.common.util.MinioUtil;
import com.jero.modules.onlyoffice.entity.BusProcessModelHis;
import com.jero.modules.onlyoffice.entity.OnlineFileLog;
import com.jero.modules.onlyoffice.mapper.BusProcessModelHisMapper;
@@ -14,11 +13,10 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.UUID;
@@ -135,7 +133,8 @@ public class BusProcessModelHisServiceImpl extends ServiceImpl<BusProcessModelHi
try {
File file = new File(filePath + path);
inputStream = new BufferedInputStream(Files.newInputStream(file.toPath()));
response.addHeader("Content-Disposition", "attachment;fileName=" + new String(file.getName().getBytes("UTF-8"), "iso-8859-1"));
response.addHeader("Content-Disposition", "attachment;fileName="
+ new String(file.getName().getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1));
response.setContentType("application/force-download");// 设置强制下载不打开
outputStream = response.getOutputStream();
byte[] buf = new byte[1024];
@@ -163,7 +162,6 @@ public class BusProcessModelHisServiceImpl extends ServiceImpl<BusProcessModelHi
}
}
}
}
/**