From c0b60dbd5791d499c037c2f7c8cdfc9760353bb3 Mon Sep 17 00:00:00 2001 From: 许鹏程 <1821349743@qq.com> Date: 星期二, 13 六月 2023 19:29:38 +0800 Subject: [PATCH] 套红文档, --- src/main/java/com/product/file/controller/FileManagerController.java | 166 ------------------------------------------------------- 1 files changed, 1 insertions(+), 165 deletions(-) diff --git a/src/main/java/com/product/file/controller/FileManagerController.java b/src/main/java/com/product/file/controller/FileManagerController.java index 5caf7b9..660c754 100644 --- a/src/main/java/com/product/file/controller/FileManagerController.java +++ b/src/main/java/com/product/file/controller/FileManagerController.java @@ -1,7 +1,6 @@ package com.product.file.controller; import com.alibaba.fastjson.JSONObject; -import com.product.common.lang.StringUtils; import com.product.core.config.CoreConst; import com.product.core.controller.support.AbstractBaseController; import com.product.core.entity.FieldSetEntity; @@ -34,6 +33,7 @@ @Autowired public FileManagerService fileManagerService; + /** * @param uuid * @param response @@ -56,144 +56,6 @@ } } - /** - * 鏂囦欢璁板綍-鏂板 - * - * @param request 璇锋眰 - * @return 缁撴灉 - */ - @RequestMapping(value = "/add-file-record-plan/{version}", method = RequestMethod.POST) - @ApiVersion(1) - public String addFileRecordPlan(HttpServletRequest request) { - 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()); - } - FieldSetEntity fs = fileManagerService.addFileRecordPlan(fse); - return fs != null ? this.OK_List(fs) : this.error(FileCode.ADD_FILE_RECORD_FAIL.getValue(), FileCode.ADD_FILE_RECORD_FAIL.getText()); - } catch (BaseException e) { - SpringMVCContextHolder.getSystemLogger().error(e); - return this.error(e.getCode(), e.getMessageInfo()); - } catch (Exception e) { - SpringMVCContextHolder.getSystemLogger().error(e); - e.printStackTrace(); - return error(FileCode.ADD_FILE_RECORD_FAIL.getValue(), FileCode.ADD_FILE_RECORD_FAIL.getText()); - } - } - - /** - * 鏂囦欢璁板綍-鏂囦欢鏂板缁撴灉鍥炶皟 - * - * @param request 璇锋眰 - * @return 缁撴灉 - */ - @RequestMapping(value = "/add-file-callback/{version}", method = RequestMethod.POST) - @ApiVersion(1) - public String addFileCallback(HttpServletRequest request) { - 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()); - } - JSONObject data = fileManagerService.addFileCallback(fse); - JSONObject result = new JSONObject(); - result.put("data", data); - result.put("msg", FileCode.SUCCESS.getText()); - result.put("code", "200"); - result.put("status", "success"); - return result.toString(); - } catch (BaseException e) { - SpringMVCContextHolder.getSystemLogger().error(e); - return this.error(e.getCode(), e.getMessageInfo()); - } catch (Exception e) { - SpringMVCContextHolder.getSystemLogger().error(e); - e.printStackTrace(); - return error(FileCode.ADD_FILE_CALLBACK_FAIL.getValue(), FileCode.ADD_FILE_CALLBACK_FAIL.getText()); - } - } - - /** - * 鏂囦欢璁板綍-鍒犻櫎鍑嗗锛堢姸鎬佷慨鏀癸級 - * - * @param request 璇锋眰 - * @return 缁撴灉 - */ - @RequestMapping(value = "/del-file-record-plan/{version}", method = RequestMethod.POST) - @ApiVersion(1) - public String delFileRecordPlan(HttpServletRequest request) { - 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()); - } - FieldSetEntity fs = fileManagerService.delFileRecordPlan(fse); - - return fs != null ? this.OK_List(fs) : this.error(FileCode.DELETE_FILE_PLAN_FIAL.getValue(), FileCode.DELETE_FILE_PLAN_FIAL.getText()); - } catch (BaseException e) { - SpringMVCContextHolder.getSystemLogger().error(e); - return this.error(e.getCode(), e.getMessageInfo()); - } catch (Exception e) { - SpringMVCContextHolder.getSystemLogger().error(e); - e.printStackTrace(); - return error(FileCode.DELETE_FILE_PLAN_FIAL.getValue(), FileCode.DELETE_FILE_PLAN_FIAL.getText()); - } - } - - /** - * 鏂囦欢璁板綍-鏂囦欢鏂板缁撴灉鍥炶皟 - * - * @param request 璇锋眰 - * @return 缁撴灉 - */ - @RequestMapping(value = "/del-file-callback/{version}", method = RequestMethod.POST) - @ApiVersion(1) - public String delFileCallback(HttpServletRequest request) { - 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()); - } - JSONObject data = fileManagerService.delFileCallback(fse); - JSONObject result = new JSONObject(); - result.put("data", data); - result.put("msg", FileCode.SUCCESS.getText()); - result.put("code", "200"); - result.put("status", "success"); - return result.toString(); - } catch (BaseException e) { - SpringMVCContextHolder.getSystemLogger().error(e); - return this.error(e.getCode(), e.getMessageInfo()); - } catch (Exception e) { - SpringMVCContextHolder.getSystemLogger().error(e); - e.printStackTrace(); - return error(FileCode.DELETE_FILE_CALLBACK_FIAL.getValue(), FileCode.DELETE_FILE_CALLBACK_FIAL.getText()); - } - } /** * 鑾峰彇瀹㈡埛涓婁紶鐨勬枃浠舵�诲ぇ灏� @@ -357,32 +219,6 @@ } } - /** - * 鑾峰彇鏂囦欢璁板綍淇℃伅 - * - * @return 缁撴灉 - */ - @RequestMapping(value = "/get-file-info/{version}", method = RequestMethod.POST) - @ApiVersion(1) - public String getFileInfo(HttpServletRequest request) { - 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 BaseUtil.success(fileManagerService.getFileInfo(fse), null); - } catch (Exception e) { - SpringMVCContextHolder.getSystemLogger().error(e); - e.printStackTrace(); - return error(FileCode.CLEAR_NO_USED_DATA_FAIL.getValue(), FileCode.CLEAR_NO_USED_DATA_FAIL.getText()); - } - } /** * 鏂囦欢鍒櫎 -- Gitblit v1.9.2