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