From 01bc34e52f414376d871548c71499adf5c277fa5 Mon Sep 17 00:00:00 2001 From: "pig4cloud.com" Date: Tue, 19 May 2020 14:29:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?dev=20=E5=88=86=E6=94=AF=E5=B7=B2=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20spring=20boot=202.3.0=20=E6=AC=A2=E8=BF=8E=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=8F=8D=E9=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.zh.md b/README.zh.md index 0639b067..1bc024c7 100644 --- a/README.zh.md +++ b/README.zh.md @@ -90,7 +90,7 @@ pig #### 交流群 -![](https://images.gitee.com/uploads/images/2020/0318/215612_66ede32c_1824312.jpeg) +![输入图片说明](https://images.gitee.com/uploads/images/2020/0519/142843_6032c52e_410595.png "qr.png") #### Star 历史 From d367baebf6bbd443273847b87e1ee1c56c3bac26 Mon Sep 17 00:00:00 2001 From: Lucky <641787296@qq.com> Date: Tue, 19 May 2020 15:16:47 +0800 Subject: [PATCH 2/2] =?UTF-8?q?:lock:=20=E4=BF=AE=E5=A4=8D=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E9=97=AE=E9=A2=98.=20=E8=B6=8A=E6=9D=83=E8=AE=BF?= =?UTF-8?q?=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pig-codegen/src/main/resources/template/Controller.java.vm | 2 ++ pig-codegen/src/main/resources/template/menu.sql.vm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pig-codegen/src/main/resources/template/Controller.java.vm b/pig-codegen/src/main/resources/template/Controller.java.vm index 03890d00..fcf345e7 100755 --- a/pig-codegen/src/main/resources/template/Controller.java.vm +++ b/pig-codegen/src/main/resources/template/Controller.java.vm @@ -52,6 +52,7 @@ public class ${className}Controller { */ @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page" ) + @PreAuthorize("@pms.hasPermission('${moduleName}_${pathName}_get')" ) public R get${className}Page(Page page, ${className} ${classname}) { return R.ok(${classname}Service.page(page, Wrappers.query(${classname}))); } @@ -64,6 +65,7 @@ public class ${className}Controller { */ @ApiOperation(value = "通过id查询", notes = "通过id查询") @GetMapping("/{${pk.lowerAttrName}}" ) + @PreAuthorize("@pms.hasPermission('${moduleName}_${pathName}_get')" ) public R getById(@PathVariable("${pk.lowerAttrName}" ) ${pk.attrType} ${pk.lowerAttrName}) { return R.ok(${classname}Service.getById(${pk.lowerAttrName})); } diff --git a/pig-codegen/src/main/resources/template/menu.sql.vm b/pig-codegen/src/main/resources/template/menu.sql.vm index c8a353d2..8ec1c2e5 100644 --- a/pig-codegen/src/main/resources/template/menu.sql.vm +++ b/pig-codegen/src/main/resources/template/menu.sql.vm @@ -14,3 +14,5 @@ insert into `sys_menu` ( `parent_id`, `permission`, `type`, `path`, `icon`, `de SELECT @parentId, '${moduleName}_${pathName}_edit', '1', null, '1', '0', '2018-05-15 21:35:18', '1', '2018-07-29 13:38:59', '${comments}修改'; insert into `sys_menu` ( `parent_id`, `permission`, `type`, `path`, `icon`, `del_flag`, `create_time`, `sort`, `update_time`, `name`) SELECT @parentId, '${moduleName}_${pathName}_del', '1', null, '1', '0', '2018-05-15 21:35:18', '2', '2018-07-29 13:38:59', '${comments}删除'; +insert into `sys_menu` ( `parent_id`, `permission`, `type`, `path`, `icon`, `del_flag`, `create_time`, `sort`, `update_time`, `name`) + SELECT @parentId, '${moduleName}_${pathName}_get', '1', null, '1', '0', '2018-05-15 21:35:18', '2', '2018-07-29 13:38:59', '${comments}获取';