From 65003cfb8275f8bf906b08a0be14f67f0de2aa17 Mon Sep 17 00:00:00 2001 From: pig666 Date: Sat, 23 May 2020 14:37:37 +0800 Subject: [PATCH] =?UTF-8?q?:lipstick:=20Updating=20the=20UI=20and=20style?= =?UTF-8?q?=20files.=20=E8=B0=83=E6=95=B4=20get=20=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=20view=20=EF=BC=8C=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E8=B6=8A=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/template/Controller.java.vm | 4 ++-- .../src/main/resources/template/menu.sql.vm | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) 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 ed49e2952..d79debba7 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 @@ -52,7 +52,7 @@ public class ${className}Controller { */ @ApiOperation(value = "分页查询", notes = "分页查询") @GetMapping("/page" ) - @PreAuthorize("@pms.hasPermission('${moduleName}_${pathName}_get')" ) + @PreAuthorize("@pms.hasPermission('${moduleName}_${pathName}_view')" ) public R get${className}Page(Page page, ${className} ${classname}) { return R.ok(${classname}Service.page(page, Wrappers.query(${classname}))); } @@ -65,7 +65,7 @@ public class ${className}Controller { */ @ApiOperation(value = "通过id查询", notes = "通过id查询") @GetMapping("/{${pk.lowerAttrName}}" ) - @PreAuthorize("@pms.hasPermission('${moduleName}_${pathName}_get')" ) + @PreAuthorize("@pms.hasPermission('${moduleName}_${pathName}_view')" ) public R getById(@PathVariable("${pk.lowerAttrName}" ) ${pk.attrType} ${pk.lowerAttrName}) { return R.ok(${classname}Service.getById(${pk.lowerAttrName})); } diff --git a/pigx-visual/pigx-codegen/src/main/resources/template/menu.sql.vm b/pigx-visual/pigx-codegen/src/main/resources/template/menu.sql.vm index 0232d8c4c..8e61df8ea 100644 --- a/pigx-visual/pigx-codegen/src/main/resources/template/menu.sql.vm +++ b/pigx-visual/pigx-codegen/src/main/resources/template/menu.sql.vm @@ -9,10 +9,10 @@ set @parentId = @@identity; -- 菜单对应按钮SQL insert into `sys_menu` ( `parent_id`, `permission`, `type`, `path`, `icon`, `del_flag`, `create_time`, `sort`, `update_time`, `name`, `tenant_id`) - SELECT @parentId, '${moduleName}_${pathName}_add', '1', null, '1', '0', '2018-05-15 21:35:18', '0', '2018-07-29 13:38:59', '${comments}新增', 1; + SELECT @parentId, '${moduleName}_${pathName}_view', '1', null, '1', '0', '2018-05-15 21:35:18', '0', '2018-07-29 13:38:59', '${comments}查看', 1; +insert into `sys_menu` ( `parent_id`, `permission`, `type`, `path`, `icon`, `del_flag`, `create_time`, `sort`, `update_time`, `name`, `tenant_id`) + SELECT @parentId, '${moduleName}_${pathName}_add', '1', null, '1', '0', '2018-05-15 21:35:18', '1', '2018-07-29 13:38:59', '${comments}新增', 1; insert into `sys_menu` ( `parent_id`, `permission`, `type`, `path`, `icon`, `del_flag`, `create_time`, `sort`, `update_time`, `name`, `tenant_id`) - SELECT @parentId, '${moduleName}_${pathName}_edit', '1', null, '1', '0', '2018-05-15 21:35:18', '1', '2018-07-29 13:38:59', '${comments}修改', 1; + SELECT @parentId, '${moduleName}_${pathName}_edit', '1', null, '1', '0', '2018-05-15 21:35:18', '2', '2018-07-29 13:38:59', '${comments}修改', 1; insert into `sys_menu` ( `parent_id`, `permission`, `type`, `path`, `icon`, `del_flag`, `create_time`, `sort`, `update_time`, `name`, `tenant_id`) - SELECT @parentId, '${moduleName}_${pathName}_del', '1', null, '1', '0', '2018-05-15 21:35:18', '2', '2018-07-29 13:38:59', '${comments}删除', 1; -insert into `sys_menu` ( `parent_id`, `permission`, `type`, `path`, `icon`, `del_flag`, `create_time`, `sort`, `update_time`, `name`, `tenant_id`) - SELECT @parentId, '${moduleName}_${pathName}_get', '1', null, '1', '0', '2018-05-15 21:35:18', '2', '2018-07-29 13:38:59', '${comments}获取', 1; + SELECT @parentId, '${moduleName}_${pathName}_del', '1', null, '1', '0', '2018-05-15 21:35:18', '3', '2018-07-29 13:38:59', '${comments}删除', 1;