| | |
| | | @ApiOperation(value = "添加角色", tags = {"三个身边后台-角色管理"}) |
| | | @OperLog(operModul = "三个身边后台",operType = 1,businessType = "添加角色") |
| | | public R add(@RequestBody AddSystemRole addSystemRole){ |
| | | int count = systemRoleService.count(new LambdaQueryWrapper<SystemRole>().eq(SystemRole::getDel, 0).eq(SystemRole::getName, addSystemRole.getName())); |
| | | long count = systemRoleService.count(new LambdaQueryWrapper<SystemRole>().eq(SystemRole::getDel, 0).eq(SystemRole::getName, addSystemRole.getName())); |
| | | if(0 < count){ |
| | | return R.fail("该角色名称已存在"); |
| | | } |
| | |
| | | @ApiOperation(value = "编辑角色", tags = {"三个身边后台-角色管理"}) |
| | | @OperLog(operModul = "三个身边后台",operType = 2,businessType = "编辑角色") |
| | | public R edit(@RequestBody EditSystemRole editSystemRole){ |
| | | int count = systemRoleService.count(new LambdaQueryWrapper<SystemRole>().eq(SystemRole::getDel, 0) |
| | | long count = systemRoleService.count(new LambdaQueryWrapper<SystemRole>().eq(SystemRole::getDel, 0) |
| | | .eq(SystemRole::getName, editSystemRole.getName()).ne(SystemRole::getId, editSystemRole.getId())); |
| | | if(0 < count){ |
| | | return R.fail("该角色名称已存在"); |