| | |
| | | @ManagerAuth(memo = "角色编辑") |
| | | public R edit(Role role) { |
| | | if (Cools.isEmpty(role)){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | if (null == role.getId()){ |
| | | roleService.insert(role); |
| | |
| | | @ManagerAuth(memo = "角色修改") |
| | | public R update(Role role){ |
| | | if (Cools.isEmpty(role) || null==role.getId()){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | roleService.updateById(role); |
| | | return R.ok(); |
| | |
| | | @ManagerAuth(memo = "角色删除") |
| | | public R delete(Integer[] ids){ |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | roleService.deleteBatchIds(Arrays.asList(ids)); |
| | | return R.ok(); |