Merge branch 'fourthStage-onlyoffice' into fourthStage
This commit is contained in:
+7
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.oss.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@@ -81,12 +82,18 @@ public class OSSFileController {
|
||||
public Result<OSSFile> queryById(@RequestParam(name = "id") String id) {
|
||||
Result<OSSFile> result = new Result<>();
|
||||
OSSFile file = ossFileService.getById(id);
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(OSSFile::getBindId, id);
|
||||
OSSFile pdfFile = ossFileService.getOne(queryWrapper);
|
||||
if (file == null) {
|
||||
return Result.error("未找到对应实体");
|
||||
}
|
||||
else {
|
||||
result.setResult(file);
|
||||
result.setSuccess(true);
|
||||
if (pdfFile != null) {
|
||||
file.setPdfId(pdfFile.getId());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -59,6 +59,13 @@ public class OSSFile extends JeroEntity {
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
@ApiModelProperty(value = "docx文件对应的pdf文件 使用此字段绑定docx的版本")
|
||||
private String bindId;
|
||||
|
||||
@TableField(exist = false)
|
||||
@ApiModelProperty(value = "PDF版本对应的文件Id")
|
||||
private String pdfId;
|
||||
|
||||
/**
|
||||
* 带文件下载的相对路径
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user