feat:优化权限和角色
This commit is contained in:
parent
8e058eb5c3
commit
4c518d423f
@ -4,6 +4,7 @@ import com.flyfish.framework.domain.po.Department;
|
|||||||
import com.flyfish.framework.domain.tree.TreeQo;
|
import com.flyfish.framework.domain.tree.TreeQo;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门(校区)查询实体
|
* 部门(校区)查询实体
|
||||||
@ -18,4 +19,9 @@ public class DepartmentQo extends TreeQo<Department> {
|
|||||||
* 额外的参数,仅针对getList指定,一般用于回显父级部门
|
* 额外的参数,仅针对getList指定,一般用于回显父级部门
|
||||||
*/
|
*/
|
||||||
private String additional;
|
private String additional;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return super.isEmpty() && StringUtils.isBlank(additional);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,4 +36,14 @@ public class RoleQo extends NameLikeQo<Role> {
|
|||||||
public CriteriaBuilder<Role> criteriaBuilder() {
|
public CriteriaBuilder<Role> criteriaBuilder() {
|
||||||
return super.criteriaBuilder().with("admin", "system");
|
return super.criteriaBuilder().with("admin", "system");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 因存在不稳定因素,永不为空
|
||||||
|
*
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ public class RoleService extends BaseReactiveServiceImpl<Role> {
|
|||||||
.flatMapMany(ids -> {
|
.flatMapMany(ids -> {
|
||||||
RoleQo qo = (RoleQo) query;
|
RoleQo qo = (RoleQo) query;
|
||||||
qo.setIds(ids);
|
qo.setIds(ids);
|
||||||
if (CollectionUtils.isEmpty(qo.getAdditions())) {
|
if (CollectionUtils.isNotEmpty(qo.getAdditions())) {
|
||||||
qo.getIds().addAll(qo.getAdditions());
|
qo.getIds().addAll(qo.getAdditions());
|
||||||
}
|
}
|
||||||
return super.getList(qo);
|
return super.getList(qo);
|
||||||
|
Loading…
Reference in New Issue
Block a user