6c
10 小时以前 2f1913cbfd84fe580cdd48b810251fdf2ad29112
src/main/java/com/product/file/controller/FileManagerController.java
@@ -441,7 +441,7 @@
    }
    /**
     * 集群文件同步方法-接收
     * 预览验证
     * @return 结果
     */
    @RequestMapping(value = "/check-preview/{version}", method = RequestMethod.POST)
@@ -469,4 +469,34 @@
            return error(FileCode.CHECK_PREVIEW_FAIL);
        }
    }
    /**
     * 预览验证
     * @return 结果
     */
    @RequestMapping(value = "/get-signature/{version}", method = RequestMethod.POST)
    @ApiVersion(1)
    public String getSignature(HttpServletRequest request, HttpServletResponse response) {
        try {
            FieldSetEntity fse = null;
            Object bean = request.getAttribute(CoreConst.API_POST_REQUEST_DATA);
            RequestParameterEntity rpe = (RequestParameterEntity) bean;
            if (null != rpe && null != rpe.getFormData()) {
                fse = rpe.getFormData();
            }
            if (fse == null) {
                SpringMVCContextHolder.getSystemLogger().error(FileCode.FORM_NODATA.getValue(), FileCode.FORM_NODATA.getText());
                return this.error(FileCode.FORM_NODATA.getValue(), FileCode.FORM_NODATA.getText());
            }
            return OK(fileManagerService.getSignature(fse));
        } catch (BaseException e) {
            SpringMVCContextHolder.getSystemLogger().error(e);
            e.printStackTrace();
            return error(e.getCode(), e.getMessage());
        } catch (Exception e) {
            SpringMVCContextHolder.getSystemLogger().error(e);
            e.printStackTrace();
            return error(FileCode.GET_USER_SIGNATURE_FAIL);
        }
    }
}