From 9f9a389fdefb5a30e5a1d5dffe66a53b574ae15f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Mon, 2 Oct 2023 20:13:34 +0800 Subject: [PATCH] 2.0 --- ...__com_github_jsqlparser_jsqlparser_3_2.xml | 13 - ...com_github_pagehelper_pagehelper_5_2_0.xml | 13 - ...p_mdp_audit_log_client_M_1_0_0_RELEASE.xml | 13 - ...m_mdp_mdp_boot_starter_M_1_0_0_RELEASE.xml | 13 - ..._mdp_mdp_cloud_starter_M_1_0_0_RELEASE.xml | 13 - ...__com_mdp_mdp_core_api_M_1_0_0_RELEASE.xml | 13 - ...om_mdp_mdp_dao_mybatis_M_1_0_0_RELEASE.xml | 13 - .../Maven__com_mdp_mdp_ds_M_1_0_0_RELEASE.xml | 13 - ..._com_mdp_mdp_ext_utils_M_1_0_0_RELEASE.xml | 13 - ...om_mdp_mdp_meta_client_M_1_0_0_RELEASE.xml | 13 - ...m_mdp_mdp_micro_client_M_1_0_0_RELEASE.xml | 13 - .../Maven__com_mdp_mdp_mq_M_1_0_0_RELEASE.xml | 13 - ...com_mdp_mdp_msg_client_M_1_0_0_RELEASE.xml | 13 - ...dp_mdp_mybatis_enhance_M_1_0_0_RELEASE.xml | 13 - ..._mdp_mdp_oauth2_client_M_1_0_0_RELEASE.xml | 13 - ...en__com_mdp_mdp_qx_api_M_1_0_0_RELEASE.xml | 13 - ...om_mdp_mdp_safe_client_M_1_0_0_RELEASE.xml | 13 - ...mdp_mdp_spring_enhance_M_1_0_0_RELEASE.xml | 13 - ...mdp_mdp_tomcat_enhance_M_1_0_0_RELEASE.xml | 13 - .../Maven__org_mybatis_mybatis_3_5_6.xml | 13 - ...ybatis_spring_boot_autoconfigure_2_1_4.xml | 13 - ...boot_mybatis_spring_boot_starter_2_1_4.xml | 13 - .idea/xm-backend.iml | 89 ++++--- pom.xml | 2 +- xm-bootstrap/pom.xml | 2 +- xm-bootstrap/xm-bootstrap.iml | 113 +++++---- xm-core/pom.xml | 2 +- .../xm/core/ctrl/XmAttachmentController.java | 175 -------------- .../com/xm/core/ctrl/XmFileController.java | 228 ------------------ xm-core/xm-core.iml | 95 +++++--- 30 files changed, 175 insertions(+), 817 deletions(-) delete mode 100644 .idea/libraries/Maven__com_github_jsqlparser_jsqlparser_3_2.xml delete mode 100644 .idea/libraries/Maven__com_github_pagehelper_pagehelper_5_2_0.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_audit_log_client_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_boot_starter_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_cloud_starter_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_core_api_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_dao_mybatis_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_ds_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_ext_utils_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_meta_client_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_micro_client_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_mq_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_msg_client_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_mybatis_enhance_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_oauth2_client_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_qx_api_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_safe_client_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_spring_enhance_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__com_mdp_mdp_tomcat_enhance_M_1_0_0_RELEASE.xml delete mode 100644 .idea/libraries/Maven__org_mybatis_mybatis_3_5_6.xml delete mode 100644 .idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_1_4.xml delete mode 100644 .idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_1_4.xml delete mode 100644 xm-core/src/main/java/com/xm/core/ctrl/XmAttachmentController.java delete mode 100644 xm-core/src/main/java/com/xm/core/ctrl/XmFileController.java diff --git a/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_3_2.xml b/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_3_2.xml deleted file mode 100644 index 7c0b8e6b..00000000 --- a/.idea/libraries/Maven__com_github_jsqlparser_jsqlparser_3_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_2_0.xml b/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_2_0.xml deleted file mode 100644 index b877688d..00000000 --- a/.idea/libraries/Maven__com_github_pagehelper_pagehelper_5_2_0.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_audit_log_client_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_audit_log_client_M_1_0_0_RELEASE.xml deleted file mode 100644 index cdce8a60..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_audit_log_client_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_boot_starter_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_boot_starter_M_1_0_0_RELEASE.xml deleted file mode 100644 index 6b74e44d..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_boot_starter_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_cloud_starter_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_cloud_starter_M_1_0_0_RELEASE.xml deleted file mode 100644 index f0a81c0f..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_cloud_starter_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_core_api_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_core_api_M_1_0_0_RELEASE.xml deleted file mode 100644 index f80c56c2..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_core_api_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_dao_mybatis_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_dao_mybatis_M_1_0_0_RELEASE.xml deleted file mode 100644 index 69170489..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_dao_mybatis_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_ds_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_ds_M_1_0_0_RELEASE.xml deleted file mode 100644 index c9fd8a0d..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_ds_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_ext_utils_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_ext_utils_M_1_0_0_RELEASE.xml deleted file mode 100644 index 26d727b9..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_ext_utils_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_meta_client_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_meta_client_M_1_0_0_RELEASE.xml deleted file mode 100644 index a8033899..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_meta_client_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_micro_client_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_micro_client_M_1_0_0_RELEASE.xml deleted file mode 100644 index bdc5005a..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_micro_client_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_mq_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_mq_M_1_0_0_RELEASE.xml deleted file mode 100644 index 0252c1fd..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_mq_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_msg_client_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_msg_client_M_1_0_0_RELEASE.xml deleted file mode 100644 index fefdffb8..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_msg_client_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_mybatis_enhance_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_mybatis_enhance_M_1_0_0_RELEASE.xml deleted file mode 100644 index 54fc824b..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_mybatis_enhance_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_oauth2_client_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_oauth2_client_M_1_0_0_RELEASE.xml deleted file mode 100644 index dfad3c65..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_oauth2_client_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_qx_api_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_qx_api_M_1_0_0_RELEASE.xml deleted file mode 100644 index ea193816..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_qx_api_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_safe_client_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_safe_client_M_1_0_0_RELEASE.xml deleted file mode 100644 index 4f06f35e..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_safe_client_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_spring_enhance_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_spring_enhance_M_1_0_0_RELEASE.xml deleted file mode 100644 index ff94937e..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_spring_enhance_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mdp_mdp_tomcat_enhance_M_1_0_0_RELEASE.xml b/.idea/libraries/Maven__com_mdp_mdp_tomcat_enhance_M_1_0_0_RELEASE.xml deleted file mode 100644 index ce4cab74..00000000 --- a/.idea/libraries/Maven__com_mdp_mdp_tomcat_enhance_M_1_0_0_RELEASE.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_mybatis_3_5_6.xml b/.idea/libraries/Maven__org_mybatis_mybatis_3_5_6.xml deleted file mode 100644 index 25ded40a..00000000 --- a/.idea/libraries/Maven__org_mybatis_mybatis_3_5_6.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_1_4.xml b/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_1_4.xml deleted file mode 100644 index eea97670..00000000 --- a/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_autoconfigure_2_1_4.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_1_4.xml b/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_1_4.xml deleted file mode 100644 index aca3b77a..00000000 --- a/.idea/libraries/Maven__org_mybatis_spring_boot_mybatis_spring_boot_starter_2_1_4.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/xm-backend.iml b/.idea/xm-backend.iml index afdd7159..7951c93c 100644 --- a/.idea/xm-backend.iml +++ b/.idea/xm-backend.iml @@ -8,16 +8,15 @@ - + - + - @@ -54,15 +53,14 @@ - - + - + @@ -80,25 +78,23 @@ - + + + + - - - - - - - - - - - - + + + + + + + @@ -114,29 +110,50 @@ - - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + - - - + + + + diff --git a/pom.xml b/pom.xml index 1ad61efb..989a0d4d 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ com.mdp mdp-products - M.1.0.0-RELEASE + 2.0.0-RELEASE UTF-8 diff --git a/xm-bootstrap/pom.xml b/xm-bootstrap/pom.xml index 71fbc3ef..c0473919 100644 --- a/xm-bootstrap/pom.xml +++ b/xm-bootstrap/pom.xml @@ -8,7 +8,7 @@ com.xm xm-backend - M.1.0.0-RELEASE + 2.0.0-RELEASE diff --git a/xm-bootstrap/xm-bootstrap.iml b/xm-bootstrap/xm-bootstrap.iml index 09c60a09..d53899ab 100644 --- a/xm-bootstrap/xm-bootstrap.iml +++ b/xm-bootstrap/xm-bootstrap.iml @@ -10,7 +10,7 @@ - + @@ -24,7 +24,6 @@ - @@ -51,9 +50,6 @@ - - - @@ -98,12 +94,11 @@ - + - @@ -117,23 +112,9 @@ - - - - - - - - - - - - - - - - + + @@ -162,15 +143,14 @@ - - + - + @@ -188,42 +168,75 @@ - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - - - + + + + diff --git a/xm-core/pom.xml b/xm-core/pom.xml index 0abb3d89..e9498774 100644 --- a/xm-core/pom.xml +++ b/xm-core/pom.xml @@ -9,7 +9,7 @@ com.xm xm-backend - M.1.0.0-RELEASE + 2.0.0-RELEASE diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmAttachmentController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmAttachmentController.java deleted file mode 100644 index 90d674ae..00000000 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmAttachmentController.java +++ /dev/null @@ -1,175 +0,0 @@ -package com.xm.core.ctrl; - -import com.mdp.core.entity.Tips; -import com.mdp.core.utils.RequestUtils; -import com.mdp.mybatis.PageUtils; -import com.mdp.swagger.ApiEntityParams; -import com.xm.core.entity.XmAttachment; -import com.xm.core.service.XmAttachmentService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponse; -import io.swagger.annotations.ApiResponses; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import springfox.documentation.annotations.ApiIgnore; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * url编制采用rest风格,如对XM.xm_attachment xm_attachment的操作有增删改查,对应的url分别为:
- * 新增: xm/xmAttachment/add
- * 查询: xm/xmAttachment/list
- * 模糊查询: xm/xmAttachment/listKey
- * 修改: xm/xmAttachment/edit
- * 删除: xm/xmAttachment/del
- * 批量删除: xm/xmAttachment/batchDel
- * 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块
- * 实体 XmAttachment 表 XM.xm_attachment 当前主键(包括多主键): id; - ***/ -@RestController("xm.core.xmAttachmentController") -@RequestMapping(value="/**/xm/core/xmAttachment") -@Api(tags={"xm_attachment操作接口"}) -public class XmAttachmentController { - - static Log logger=LogFactory.getLog(XmAttachmentController.class); - - @Autowired - private XmAttachmentService xmAttachmentService; - - - - - @ApiOperation( value = "查询xm_attachment信息列表",notes="listXmAttachment,条件之间是 and关系,模糊查询写法如 {studentName:'%才哥%'}") - @ApiEntityParams(XmAttachment.class) - @ApiResponses({ - @ApiResponse(code = 200,response= XmAttachment.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'错误码'},total:总记录数,data:[数据对象1,数据对象2,...]}") - }) - @RequestMapping(value="/list",method=RequestMethod.GET) - public Map listXmAttachment( @ApiIgnore @RequestParam Map xmAttachment){ - Map m = new HashMap<>(); - RequestUtils.transformArray(xmAttachment, "ids"); - PageUtils.startPage(xmAttachment); - List> xmAttachmentList = xmAttachmentService.selectListMapByWhere(xmAttachment); //列出XmAttachment列表 - PageUtils.responePage(m, xmAttachmentList); - m.put("data",xmAttachmentList); - Tips tips=new Tips("查询成功"); - m.put("tips", tips); - return m; - } - - - - /** - @ApiOperation( value = "新增一条xm_attachment信息",notes="addXmAttachment,主键如果为空,后台自动生成") - @ApiResponses({ - @ApiResponse(code = 200,response=XmAttachment.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") - }) - @RequestMapping(value="/add",method=RequestMethod.POST) - public Map addXmAttachment(@RequestBody XmAttachment xmAttachment) { - Map m = new HashMap<>(); - Tips tips=new Tips("成功新增一条数据"); - try{ - if(StringUtils.isEmpty(xmAttachment.getId())) { - xmAttachment.setId(xmAttachmentService.createKey("id")); - }else{ - XmAttachment xmAttachmentQuery = new XmAttachment(xmAttachment.getId()); - if(xmAttachmentService.countByWhere(xmAttachmentQuery)>0){ - tips.setFailureMsg("编号重复,请修改编号再提交"); - m.put("tips", tips); - return m; - } - } - xmAttachmentService.insert(xmAttachment); - m.put("data",xmAttachment); - }catch (BizException e) { - tips=e.getTips(); - logger.error("",e); - }catch (Exception e) { - tips.setFailureMsg(e.getMessage()); - logger.error("",e); - } - m.put("tips", tips); - return m; - } - */ - - /** - @ApiOperation( value = "删除一条xm_attachment信息",notes="delXmAttachment,仅需要上传主键字段") - @ApiResponses({ - @ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}}") - }) - @RequestMapping(value="/del",method=RequestMethod.POST) - public Map delXmAttachment(@RequestBody XmAttachment xmAttachment){ - Map m = new HashMap<>(); - Tips tips=new Tips("成功删除一条数据"); - try{ - xmAttachmentService.deleteByPk(xmAttachment); - }catch (BizException e) { - tips=e.getTips(); - logger.error("",e); - }catch (Exception e) { - tips.setFailureMsg(e.getMessage()); - logger.error("",e); - } - m.put("tips", tips); - return m; - } - */ - - /** - @ApiOperation( value = "根据主键修改一条xm_attachment信息",notes="editXmAttachment") - @ApiResponses({ - @ApiResponse(code = 200,response=XmAttachment.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") - }) - @RequestMapping(value="/edit",method=RequestMethod.POST) - public Map editXmAttachment(@RequestBody XmAttachment xmAttachment) { - Map m = new HashMap<>(); - Tips tips=new Tips("成功更新一条数据"); - try{ - xmAttachmentService.updateByPk(xmAttachment); - m.put("data",xmAttachment); - }catch (BizException e) { - tips=e.getTips(); - logger.error("",e); - }catch (Exception e) { - tips.setFailureMsg(e.getMessage()); - logger.error("",e); - } - m.put("tips", tips); - return m; - } - */ - - - - /** - @ApiOperation( value = "根据主键列表批量删除xm_attachment信息",notes="batchDelXmAttachment,仅需要上传主键字段") - @ApiResponses({ - @ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}") - }) - @RequestMapping(value="/batchDel",method=RequestMethod.POST) - public Map batchDelXmAttachment(@RequestBody List xmAttachments) { - Map m = new HashMap<>(); - Tips tips=new Tips("成功删除"+xmAttachments.size()+"条数据"); - try{ - xmAttachmentService.batchDelete(xmAttachments); - }catch (BizException e) { - tips=e.getTips(); - logger.error("",e); - }catch (Exception e) { - tips.setFailureMsg(e.getMessage()); - logger.error("",e); - } - m.put("tips", tips); - return m; - } - */ -} diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmFileController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmFileController.java deleted file mode 100644 index 4ddb6e62..00000000 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmFileController.java +++ /dev/null @@ -1,228 +0,0 @@ -package com.xm.core.ctrl; - -import com.mdp.audit.log.client.annotation.AuditLog; -import com.mdp.audit.log.client.annotation.OperType; -import com.mdp.core.entity.Tips; -import com.mdp.core.err.BizException; -import com.mdp.core.utils.RequestUtils; -import com.mdp.core.utils.ResponseHelper; -import com.mdp.mybatis.PageUtils; -import com.mdp.qx.HasQx; -import com.mdp.safe.client.entity.User; -import com.mdp.safe.client.utils.LoginUtils; -import com.mdp.swagger.ApiEntityParams; -import com.xm.core.entity.XmFile; -import com.xm.core.service.XmFileService; -import com.xm.core.service.XmGroupService; -import com.xm.core.service.XmProjectService; -import com.xm.core.vo.XmFileVo; -import io.swagger.annotations.*; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import springfox.documentation.annotations.ApiIgnore; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * url编制采用rest风格,如对XM.xm_file xm_file的操作有增删改查,对应的url分别为:
- * 新增: xm/xmFile/add
- * 查询: xm/xmFile/list
- * 模糊查询: xm/xmFile/listKey
- * 修改: xm/xmFile/edit
- * 删除: xm/xmFile/del
- * 批量删除: xm/xmFile/batchDel
- * 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块
- * 实体 XmFile 表 XM.xm_file 当前主键(包括多主键): id; - ***/ -@RestController("xm.core.xmFileController") -@RequestMapping(value="/**/xm/core/xmFile") -@Api(tags={"xm_file操作接口"}) -public class XmFileController { - - static Log logger=LogFactory.getLog(XmFileController.class); - - @Autowired - private XmFileService xmFileService; - - @Autowired - XmProjectService xmProjectService; - - @Autowired - XmGroupService xmGroupService; - - - @ApiOperation( value = "查询xm_file信息列表",notes="listXmFile,条件之间是 and关系,模糊查询写法如 {studentName:'%才哥%'}") - @ApiEntityParams(XmFile.class) - @ApiImplicitParams({ @ApiImplicitParam(name="pageSize",value="每页记录数",required=false), - @ApiImplicitParam(name="pageNum",value="当前页码,从1开始",required=false), - @ApiImplicitParam(name="total",value="总记录数,服务器端收到0时,会自动计算总记录数,如果上传>0的不自动计算",required=false), - @ApiImplicitParam(name="orderBy",value="排序列 如性别、学生编号排序 orderBy = sex desc,student_id desc",required=false), - @ApiImplicitParam(name="count",value="是否进行总条数计算,count=true|false",required=false) - }) - @ApiResponses({ - @ApiResponse(code = 200,response= XmFile.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'错误码'},total:总记录数,data:[数据对象1,数据对象2,...]}") - }) - @RequestMapping(value="/list",method=RequestMethod.GET) - public Map listXmFile( @ApiIgnore @RequestParam Map xmFile){ - Map m = new HashMap<>(); - RequestUtils.transformArray(xmFile, "ids"); - PageUtils.startPage(xmFile); - List> xmFileList = xmFileService.getFile(xmFile); //列出XmFile列表 - PageUtils.responePage(m, xmFileList); - m.put("data",xmFileList); - Tips tips=new Tips("查询成功"); - m.put("tips", tips); - return m; - } - - - - @ApiOperation( value = "新增一条xm_file信息",notes="addXmFile,主键如果为空,后台自动生成") - @ApiResponses({ - @ApiResponse(code = 200,response=XmFile.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") - }) - //@HasQx(value = "xm_core_xmFile_add",name = "新增项目、产品文档",moduleId = "xm-project",moduleName = "管理端-项目管理系统") - @RequestMapping(value="/add",method=RequestMethod.POST) - public Map addXmFile(@RequestBody XmFileVo xmFileVo) { - Map m = new HashMap<>(); - Tips tips=new Tips("成功新增一条数据"); - try{ - xmFileVo = xmFileService.addFile(xmFileVo); - m.put("data",xmFileVo); - }catch (BizException e) { - tips=e.getTips(); - logger.error("",e); - }catch (Exception e) { - tips.setFailureMsg(e.getMessage()); - logger.error("",e); - } - m.put("tips", tips); - return m; - } - - @ApiOperation( value = "删除一条xm_file信息",notes="delXmFile,仅需要上传主键字段") - @ApiResponses({ - @ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}}") - }) - //@HasQx(value = "xm_core_xmFile_del",name = "删除项目、产品文档",moduleId = "xm-project",moduleName = "管理端-项目管理系统") - @RequestMapping(value="/del",method=RequestMethod.POST) - public Map delXmFile(@RequestBody XmFile xmFile){ - Map m = new HashMap<>(); - Tips tips=new Tips("成功删除一条数据"); - try{ - User user= LoginUtils.getCurrentUserInfo(); - XmFile file=this.xmFileService.selectOneById(xmFile.getId()); - if(file==null){ - return ResponseHelper.failed("data-0","数据已不存在"); - } - - if(!user.getUserid().equals(file.getCreateUserid()) ){ - Tips isHead=xmGroupService.checkIsProjectAdmOrTeamHeadOrAss(user,file.getCreateUserid(),file.getProjectId()); - if(!isHead.isOk()){ - return ResponseHelper.failed("no-qx","您只能删除自己创建的文档"); - } - - } - xmFileService.deleteFile(xmFile); - }catch (BizException e) { - tips=e.getTips(); - logger.error("",e); - }catch (Exception e) { - tips.setFailureMsg(e.getMessage()); - logger.error("",e); - } - m.put("tips", tips); - return m; - } - - @ApiOperation( value = "根据主键修改一条xm_file信息",notes="editXmFile") - @ApiResponses({ - @ApiResponse(code = 200,response=XmFile.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") - }) - //@HasQx(value = "xm_core_xmFile_edit",name = "修改项目、产品文档",moduleId = "xm-project",moduleName = "管理端-项目管理系统") - @RequestMapping(value="/edit",method=RequestMethod.POST) - public Map editXmFile(@RequestBody XmFileVo xmFileVo) { - Map m = new HashMap<>(); - Tips tips=new Tips("成功更新一条数据"); - try{ - xmFileService.updateFile(xmFileVo); - m.put("data",xmFileVo); - }catch (BizException e) { - tips=e.getTips(); - logger.error("",e); - }catch (Exception e) { - tips.setFailureMsg(e.getMessage()); - logger.error("",e); - } - m.put("tips", tips); - return m; - } - - - - /** - @ApiOperation( value = "根据主键列表批量删除xm_file信息",notes="batchDelXmFile,仅需要上传主键字段") - @ApiResponses({ - @ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}") - }) - @RequestMapping(value="/batchDel",method=RequestMethod.POST) - public Map batchDelXmFile(@RequestBody List xmFiles) { - Map m = new HashMap<>(); - Tips tips=new Tips("成功删除"+xmFiles.size()+"条数据"); - try{ - xmFileService.batchDelete(xmFiles); - }catch (BizException e) { - tips=e.getTips(); - logger.error("",e); - }catch (Exception e) { - tips.setFailureMsg(e.getMessage()); - logger.error("",e); - } - m.put("tips", tips); - return m; - } - */ - - - /** - * 流程审批过程中回调该接口,更新业务数据 - * 如果发起流程时上送了restUrl,则无论流程中是否配置了监听器都会在流程发生以下事件时推送数据过来 - * eventName: PROCESS_STARTED 流程启动完成 全局 - * PROCESS_COMPLETED 流程正常结束 全局 - * PROCESS_CANCELLED 流程删除 全局 - * create 人工任务启动 - * complete 人工任务完成 - * assignment 人工任务分配给了具体的人 - * delete 人工任务被删除 - * - * 其中 create/complete/assignment/delete事件是需要在模型中人工节点上配置了委托代理表达式 ${taskBizCallListener}才会推送过来。 - * 在人工任务节点上配置 任务监听器 建议事件为 complete,其它assignment/create/complete/delete也可以,一般建议在complete,委托代理表达式 ${taskBizCallListener} - * - * @param flowVars {flowBranchId,agree,procInstId,assignee,actId,taskName,mainTitle,branchId,bizKey,commentMsg,eventName,modelKey} 等 - * @return 如果tips.isOk==false,将影响流程提交 - **/ - @AuditLog(firstMenu="办公平台",secondMenu="项目文档管理",func="processApprova",funcDesc="文档审批",operType=OperType.UPDATE) - @RequestMapping(value="/processApprova",method=RequestMethod.POST) - public Map processApprova( @RequestBody Map flowVars){ - Map m = new HashMap<>(); - Tips tips=new Tips("成功新增一条数据"); - - try{ - - this.xmFileService.processApprova(flowVars); - logger.debug("procInstId====="+flowVars.get("procInstId")); - }catch (BizException e) { - tips=e.getTips(); - logger.error("执行异常",e); - }catch (Exception e) { - tips.setFailureMsg(e.getMessage()); - logger.error("执行异常",e); - } - m.put("tips", tips); - return m; - } -} diff --git a/xm-core/xm-core.iml b/xm-core/xm-core.iml index 9eefbb63..244e7436 100644 --- a/xm-core/xm-core.iml +++ b/xm-core/xm-core.iml @@ -11,7 +11,18 @@ - + + + + + + + + + + + + @@ -27,30 +38,47 @@ - - + + + + + + + + + + + + + + + + + + - - + + + + + - - + - @@ -106,7 +134,6 @@ - @@ -120,40 +147,30 @@ - - - - - - - - - - + + - - + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + +