mirror of https://gitee.com/stylefeng/roses
【8.3.3】【role】分类树接口,更新忽略查询的角色分类id
parent
0fdcae3439
commit
3bdb6a5a95
|
@ -59,4 +59,10 @@ public class RoleCategoryRequest extends BaseRequest {
|
||||||
@ChineseDescription("角色分类排序")
|
@ChineseDescription("角色分类排序")
|
||||||
private BigDecimal fldSort;
|
private BigDecimal fldSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用在树查询上,用来作为忽略当条记录的传参
|
||||||
|
*/
|
||||||
|
@ChineseDescription("用在树查询上,用来作为忽略当条记录的传参")
|
||||||
|
private Long ignoreCategoryId;
|
||||||
|
|
||||||
}
|
}
|
|
@ -39,6 +39,12 @@ public class RoleCategoryServiceImpl extends ServiceImpl<RoleCategoryMapper, Rol
|
||||||
@Override
|
@Override
|
||||||
public List<RoleCategory> treeList(RoleCategoryRequest roleCategoryRequest) {
|
public List<RoleCategory> treeList(RoleCategoryRequest roleCategoryRequest) {
|
||||||
LambdaQueryWrapper<RoleCategory> wrapper = this.createWrapper(roleCategoryRequest);
|
LambdaQueryWrapper<RoleCategory> wrapper = this.createWrapper(roleCategoryRequest);
|
||||||
|
|
||||||
|
// 设置忽略查询的当条记录id
|
||||||
|
if (roleCategoryRequest.getIgnoreCategoryId() != null) {
|
||||||
|
wrapper.ne(RoleCategory::getId, roleCategoryRequest.getIgnoreCategoryId());
|
||||||
|
}
|
||||||
|
|
||||||
List<RoleCategory> list = this.list(wrapper);
|
List<RoleCategory> list = this.list(wrapper);
|
||||||
if (ObjectUtil.isEmpty(list)) {
|
if (ObjectUtil.isEmpty(list)) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
|
|
Loading…
Reference in New Issue