💄 Updating the UI and style files. 调整 get 查询校验 view ,防止越权
This commit is contained in:
1 parent
7b77575a13
commit
65003cfb82
2 files changed
+7
-7
No files matched your search
@@ -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}));
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
Reference in new issue
Block a user