| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/resource/edit/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "菜单编辑") |
| | | public R edit(Resource resource) { |
| | | if (Cools.isEmpty(resource)){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/resource/add/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "菜单添加") |
| | | public R add(Resource resource) { |
| | | resourceService.insert(resource); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/resource/update/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "菜单修改") |
| | | public R update(Resource resource){ |
| | | if (Cools.isEmpty(resource) || null==resource.getId()){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/resource/delete/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "菜单删除") |
| | | public R delete(Integer[] ids){ |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/resource/export/auth") |
| | | @ManagerAuth |
| | | @ManagerAuth(memo = "菜单导出") |
| | | public R export(@RequestBody JSONObject param){ |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | EntityWrapper<Resource> wrapper = new EntityWrapper<>(); |