OnlyOffice的Bug修复
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled

This commit is contained in:
XaoLi717 2024-12-26 19:00:25 +08:00
parent dacde117ec
commit 95082232a6

View File

@ -173,6 +173,7 @@ public class onlyofController {
public void download(String name, String cDate,HttpServletResponse response) {
cDate = cDate.equals("") ? cDate : cDate + "\\";
// System.out.println("download: "+name+"---"+response+"---"+uuid);
System.out.println("cDate:"+cDate);
try {
FileUtil.downLoadFile(name,filePath+cDate,response);
} catch (IOException e) {
@ -205,12 +206,13 @@ public class onlyofController {
@GetMapping("/editStatus")
@Operation(summary = "文件状态")
@PreAuthorize("@ss.hasPermission('only:onlyof:editStatus')")
public ResponseEntity<Object> getDoucmentEditStatus(String name) throws ParseException {
public ResponseEntity<Object> getDoucmentEditStatus(String name,String cDate) throws ParseException {
cDate = (cDate != null && !cDate.isEmpty()) ? cDate + "\\" : cDate;
// System.out.println("editStatus");
String url = officeUrl+officeCommand;
Map<String,String> map = new HashMap<String,String>();
map.put("c", "forcesave");
String docFileMd5 = Md5Utils.getFileMd5(new File(filePath+name));
String docFileMd5 = Md5Utils.getFileMd5(new File(filePath+cDate+name));
if (StringUtils.isBlank(docFileMd5)) {
// throw new DocumentException(ErrorCodeEnum.DOC_FILE_MD5_ERROR);
}