From 70b7b035f575e0a3df98e6b88f80cbe952e9300b Mon Sep 17 00:00:00 2001 From: huangxutao Date: Wed, 19 Jun 2019 17:39:52 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E6=98=BE=E7=A4=BA=E6=8E=A5=E5=8F=A3=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pig4cloud/pigx/admin/controller/SysFileController.java | 1 + .../src/main/resources/template/Controller.java.vm | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysFileController.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysFileController.java index 2eae8ee2e..e7e9f2f26 100644 --- a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysFileController.java +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysFileController.java @@ -104,6 +104,7 @@ public class SysFileController { * @param id id * @return R */ + @ApiOperation(value = "通过id删除文件管理", notes = "通过id删除文件管理") @SysLog("删除文件管理") @DeleteMapping("/{id}") @PreAuthorize("@pms.hasPermission('sys_file_del')") diff --git a/pigx-visual/pigx-codegen/src/main/resources/template/Controller.java.vm b/pigx-visual/pigx-codegen/src/main/resources/template/Controller.java.vm index 089f552c2..53c2120a9 100755 --- a/pigx-visual/pigx-codegen/src/main/resources/template/Controller.java.vm +++ b/pigx-visual/pigx-codegen/src/main/resources/template/Controller.java.vm @@ -51,6 +51,7 @@ public class ${className}Controller { * @param ${classname} ${comments} * @return */ + @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page" ) public R get${className}Page(Page page, ${className} ${classname}) { return R.ok(${classname}Service.page(page, Wrappers.query(${classname}))); @@ -62,6 +63,7 @@ public class ${className}Controller { * @param ${pk.lowerAttrName} id * @return R */ + @ApiOperation(value = "通过id查询", notes = "通过id查询") @GetMapping("/{${pk.lowerAttrName}}" ) public R getById(@PathVariable("${pk.lowerAttrName}" ) ${pk.attrType} ${pk.lowerAttrName}) { return R.ok(${classname}Service.getById(${pk.lowerAttrName})); @@ -72,6 +74,7 @@ public class ${className}Controller { * @param ${classname} ${comments} * @return R */ + @ApiOperation(value = "新增${comments}", notes = "新增${comments}") @SysLog("新增${comments}" ) @PostMapping @PreAuthorize("@pms.hasPermission('${moduleName}_${pathName}_add')" ) @@ -84,6 +87,7 @@ public class ${className}Controller { * @param ${classname} ${comments} * @return R */ + @ApiOperation(value = "修改${comments}", notes = "修改${comments}") @SysLog("修改${comments}" ) @PutMapping @PreAuthorize("@pms.hasPermission('${moduleName}_${pathName}_edit')" ) @@ -96,7 +100,8 @@ public class ${className}Controller { * @param ${pk.lowerAttrName} id * @return R */ - @SysLog("删除${comments}" ) + @ApiOperation(value = "通过id删除${comments}", notes = "通过id删除${comments}") + @SysLog("通过id删除${comments}" ) @DeleteMapping("/{${pk.lowerAttrName}}" ) @PreAuthorize("@pms.hasPermission('${moduleName}_${pathName}_del')" ) public R removeById(@PathVariable ${pk.attrType} ${pk.lowerAttrName}) {