| | |
| | | @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(); |
| | |
| | | // } |
| | | } |
| | | |
| | | Page<Role> page = roleService.selectPage(new Page<>(0, 10), wrapper); |
| | | Page<Role> page = roleService.selectPage(new Page<>(0, 1000), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (Role role : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |