| | |
| | | @ManagerAuth |
| | | public R edit(Permission permission) { |
| | | if (Cools.isEmpty(permission)){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | if (null == permission.getId()){ |
| | | permissionService.insert(permission); |
| | |
| | | @ManagerAuth |
| | | public R update(Permission permission){ |
| | | if (Cools.isEmpty(permission) || null==permission.getId()){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | permissionService.updateById(permission); |
| | | return R.ok(); |
| | |
| | | @ManagerAuth |
| | | public R delete(Integer[] ids){ |
| | | if (Cools.isEmpty(ids)){ |
| | | return R.error(); |
| | | return R.error("参数缺失"); |
| | | } |
| | | permissionService.deleteBatchIds(Arrays.asList(ids)); |
| | | return R.ok(); |