许鹏程
2023-08-08 90389e761696fc423cface6fb282514ace92d09f
xn commit
已修改4个文件
12 ■■■■ 文件已修改
src/main/java/com/product/file/controller/WebOfficeController.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/product/file/service/FileManagerService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/product/file/service/OnlineDocumentEditService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/product/file/util/PdfConcurrenceUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/product/file/controller/WebOfficeController.java
@@ -164,6 +164,7 @@
    @ApiVersion(1)
    public String openOffice(Model model, HttpServletRequest request) {
        try {
        //获取参数
        FieldSetEntity fse = null;
        Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA);
@@ -232,6 +233,10 @@
        model.addAttribute("transportProtocols", "http");
        model.addAttribute("port", Global.getSystemConfig("server.port", ""));
        return "webOffice";
        } catch (Exception e) {
            e.printStackTrace();
            return "404";
        }
    }
    /**
src/main/java/com/product/file/service/FileManagerService.java
@@ -560,7 +560,8 @@
     */
    public byte[] getFileContent(FieldSetEntity attachmentFse) throws BaseException {
        if (attachmentFse == null || !CmnConst.PRODUCT_SYS_ATTACHMENTS.equals(attachmentFse.getTableName())) {
            return new byte[16];
            //返回一个空的字节数组
            return new byte[0];
        }
        try (ByteArrayOutputStream os = new ByteArrayOutputStream();) {
            FTPService ftpService = new FTPService();
src/main/java/com/product/file/service/OnlineDocumentEditService.java
@@ -288,7 +288,7 @@
                    //正在被编辑
                    String existsKey = keys.toArray(new String[]{})[0];
                    //这里会抛出正在编辑的异常
                    throwBeingEditDocument(existsKey.substring(existsKey.lastIndexOf("-")));
                    throwBeingEditDocument(existsKey.substring(existsKey.lastIndexOf("-")+1));
                } else if (remove) {
                    RedisUtil.setOutTime(key, getExpirationTime());
                    return;
src/main/java/com/product/file/util/PdfConcurrenceUtil.java
@@ -190,7 +190,7 @@
        File outFile = null;
        OfficeManager officeManager = null;
        try {
            if(Global.getPropertyToBoolean("open.office.isEnable", "true")) {//启用oepn office转换
            if(Global.getPropertyToBoolean("open.office.isEnable", "false")) {//启用oepn office转换
                officeManager = officeManagerQueue.take();
                inputFile = new File(input);
                outFile = new File(output);