From 2e7971664d27f8d294064b3e40313cfccd91e61e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Thu, 6 May 2021 01:09:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=86=E4=BA=AB=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E7=9A=84=E5=85=8D=E7=99=BB=E5=BD=95=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=AF=A6=E7=BB=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xm/core/ctrl/XmEnvListController.java | 4 +-- .../xm/core/ctrl/XmExchangeController.java | 33 +++++++++++-------- .../com/xm/core/ctrl/XmFileController.java | 4 +-- .../com/xm/core/ctrl/XmProjectController.java | 5 ++- .../core/ctrl/XmProjectEnvListController.java | 4 +-- .../XmProjectMBudgetCostNouserController.java | 4 +-- .../XmProjectMBudgetCostUserController.java | 4 +-- .../ctrl/XmProjectMCostNouserController.java | 4 +-- .../ctrl/XmProjectMCostUserController.java | 4 +-- .../xm/core/ctrl/XmQuestionController.java | 4 +-- .../com/xm/core/ctrl/XmTaskController.java | 4 +-- .../core/ctrl/XmTaskExecuserController.java | 4 +-- 12 files changed, 41 insertions(+), 37 deletions(-) diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmEnvListController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmEnvListController.java index a4ac9d7a..4f067756 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmEnvListController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmEnvListController.java @@ -1,12 +1,12 @@ 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.mybatis.PageUtils; import com.mdp.qx.HasQx; -import com.mdp.audit.log.client.annotation.AuditLog; -import com.mdp.audit.log.client.annotation.OperType; import com.xm.core.entity.XmEnvList; import com.xm.core.service.XmEnvListService; import io.swagger.annotations.*; diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmExchangeController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmExchangeController.java index 4f4e3bbf..1a78af84 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmExchangeController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmExchangeController.java @@ -1,13 +1,23 @@ package com.xm.core.ctrl; +import com.mdp.core.entity.Tips; +import com.mdp.core.err.BizException; +import com.mdp.core.utils.RequestUtils; +import com.mdp.mybatis.PageUtils; +import com.mdp.qx.HasQx; +import com.xm.core.entity.XmExchange; import com.xm.core.service.XmExchangeService; -import io.swagger.annotations.Api; +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.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; /** * url编制采用rest风格,如对XM.xm_exchange 功能表的操作有增删改查,对应的url分别为:
@@ -32,7 +42,6 @@ public class XmExchangeController { - /** @ApiOperation( value = "查询功能表信息列表",notes="listXmExchange,条件之间是 and关系,模糊查询写法如 {studentName:'%才哥%'}") @ApiImplicitParams({ @ApiImplicitParam(name="id",value="评论编号,主键",required=false), @@ -72,22 +81,21 @@ public class XmExchangeController { Map m = new HashMap<>(); RequestUtils.transformArray(xmExchange, "ids"); PageUtils.startPage(xmExchange); - List> xmExchangeList = xmExchangeService.selectListMapByWhere(xmExchange); //列出XmExchange列表 + List> xmExchangeList = xmExchangeService.selectListMapByWhere(xmExchange); //列出XmExchange列表 PageUtils.responePage(m, xmExchangeList); m.put("data",xmExchangeList); Tips tips=new Tips("查询成功"); m.put("tips", tips); return m; } - **/ - /** + @ApiOperation( value = "新增一条功能表信息",notes="addXmExchange,主键如果为空,后台自动生成") @ApiResponses({ @ApiResponse(code = 200,response=XmExchange.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") }) - @RequestMapping(value="/add",method=RequestMethod.POST) + @RequestMapping(value="/add",method= RequestMethod.POST) public Map addXmExchange(@RequestBody XmExchange xmExchange) { Map m = new HashMap<>(); Tips tips=new Tips("成功新增一条数据"); @@ -114,9 +122,9 @@ public class XmExchangeController { m.put("tips", tips); return m; } - */ + - /** + @ApiOperation( value = "删除一条功能表信息",notes="delXmExchange,仅需要上传主键字段") @ApiResponses({ @ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}}") @@ -128,7 +136,7 @@ public class XmExchangeController { Tips tips=new Tips("成功删除一条数据"); try{ xmExchangeService.deleteByPk(xmExchange); - }catch (BizException e) { + }catch (BizException e) { tips=e.getTips(); logger.error("",e); }catch (Exception e) { @@ -139,8 +147,6 @@ public class XmExchangeController { return m; } - */ - /** @ApiOperation( value = "根据主键修改一条功能表信息",notes="editXmExchange") @ApiResponses({ @ApiResponse(code = 200,response=XmExchange.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") @@ -162,7 +168,6 @@ public class XmExchangeController { 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 index d1378d2c..9be14301 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmFileController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmFileController.java @@ -1,12 +1,12 @@ 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.mybatis.PageUtils; import com.mdp.qx.HasQx; -import com.mdp.audit.log.client.annotation.AuditLog; -import com.mdp.audit.log.client.annotation.OperType; import com.xm.core.entity.XmFile; import com.xm.core.service.XmFileService; import com.xm.core.vo.XmFileVo; diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectController.java index 26790de9..fddc4034 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectController.java @@ -1,16 +1,15 @@ 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.mybatis.PageUtils; import com.mdp.qx.HasQx; -import com.mdp.audit.log.client.annotation.AuditLog; -import com.mdp.audit.log.client.annotation.OperType; import com.mdp.safe.client.entity.User; import com.mdp.safe.client.utils.LoginUtils; import com.xm.core.entity.XmProject; -import com.xm.core.entity.XmProjectGroup; import com.xm.core.service.XmProjectGroupService; import com.xm.core.service.XmProjectService; import com.xm.core.vo.XmProjectGroupVo; diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectEnvListController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectEnvListController.java index 69bf4ab6..f0eb8b59 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectEnvListController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectEnvListController.java @@ -1,11 +1,11 @@ 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.mybatis.PageUtils; -import com.mdp.audit.log.client.annotation.AuditLog; -import com.mdp.audit.log.client.annotation.OperType; import com.xm.core.entity.XmProjectEnvList; import com.xm.core.service.XmProjectEnvListService; import io.swagger.annotations.*; diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMBudgetCostNouserController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMBudgetCostNouserController.java index 444a1311..17b96efd 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMBudgetCostNouserController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMBudgetCostNouserController.java @@ -1,13 +1,13 @@ package com.xm.core.ctrl; import com.alibaba.fastjson.JSON; +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.NumberUtil; import com.mdp.core.utils.RequestUtils; import com.mdp.mybatis.PageUtils; -import com.mdp.audit.log.client.annotation.AuditLog; -import com.mdp.audit.log.client.annotation.OperType; import com.xm.core.entity.XmProjectMBudgetCostNouser; import com.xm.core.service.XmProjectMBudgetCostNouserService; import com.xm.core.service.XmRecordService; diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMBudgetCostUserController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMBudgetCostUserController.java index 4cec4c32..dc41ba41 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMBudgetCostUserController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMBudgetCostUserController.java @@ -1,13 +1,13 @@ package com.xm.core.ctrl; import com.alibaba.fastjson.JSON; +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.NumberUtil; import com.mdp.core.utils.RequestUtils; import com.mdp.mybatis.PageUtils; -import com.mdp.audit.log.client.annotation.AuditLog; -import com.mdp.audit.log.client.annotation.OperType; import com.xm.core.entity.XmProjectMBudgetCostUser; import com.xm.core.service.XmProjectMBudgetCostUserService; import com.xm.core.service.XmRecordService; diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMCostNouserController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMCostNouserController.java index 95507607..2bf39dd3 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMCostNouserController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMCostNouserController.java @@ -1,13 +1,13 @@ package com.xm.core.ctrl; import com.alibaba.fastjson.JSON; +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.NumberUtil; import com.mdp.core.utils.RequestUtils; import com.mdp.mybatis.PageUtils; -import com.mdp.audit.log.client.annotation.AuditLog; -import com.mdp.audit.log.client.annotation.OperType; import com.xm.core.entity.XmProjectMCostNouser; import com.xm.core.service.XmProjectMCostNouserService; import com.xm.core.service.XmRecordService; diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMCostUserController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMCostUserController.java index ca44e871..3f5be5bf 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMCostUserController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmProjectMCostUserController.java @@ -1,13 +1,13 @@ package com.xm.core.ctrl; import com.alibaba.fastjson.JSON; +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.NumberUtil; import com.mdp.core.utils.RequestUtils; import com.mdp.mybatis.PageUtils; -import com.mdp.audit.log.client.annotation.AuditLog; -import com.mdp.audit.log.client.annotation.OperType; import com.xm.core.entity.XmProjectMBudgetCostNouser; import com.xm.core.entity.XmProjectMCostUser; import com.xm.core.service.XmProjectMCostUserService; diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java index 4966e65b..d4496a4e 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmQuestionController.java @@ -1,5 +1,7 @@ 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; @@ -7,8 +9,6 @@ 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.audit.log.client.annotation.AuditLog; -import com.mdp.audit.log.client.annotation.OperType; import com.xm.core.entity.XmQuestion; import com.xm.core.service.XmQuestionService; import com.xm.core.service.push.XmPushMsgService; diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java index c2911636..559e6fc9 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java @@ -1,6 +1,8 @@ package com.xm.core.ctrl; import com.alibaba.fastjson.JSON; +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.NumberUtil; @@ -9,8 +11,6 @@ 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.audit.log.client.annotation.AuditLog; -import com.mdp.audit.log.client.annotation.OperType; import com.xm.core.entity.XmTask; import com.xm.core.service.XmProjectGroupService; import com.xm.core.service.XmRecordService; diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskExecuserController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskExecuserController.java index 4ec9f77a..8b6cd90e 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskExecuserController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskExecuserController.java @@ -1,5 +1,7 @@ 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; @@ -7,8 +9,6 @@ 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.audit.log.client.annotation.AuditLog; -import com.mdp.audit.log.client.annotation.OperType; import com.xm.core.entity.XmTask; import com.xm.core.entity.XmTaskExecuser; import com.xm.core.service.XmProjectGroupService;