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