|
@@ -153,6 +153,7 @@ public class OrgCloudServiceProvider extends ControllerSupport implements OrgClo
|
|
@PostMapping("getOrgs")
|
|
@PostMapping("getOrgs")
|
|
@Override
|
|
@Override
|
|
public GetOrgsResp getOrgs(@RequestBody GetOrgsReq req) {
|
|
public GetOrgsResp getOrgs(@RequestBody GetOrgsReq req) {
|
|
|
|
+ Boolean withoutParentId = req.getWithoutParentId();
|
|
Long rootOrgId = req.getRootOrgId();
|
|
Long rootOrgId = req.getRootOrgId();
|
|
Boolean enable = req.getEnable();
|
|
Boolean enable = req.getEnable();
|
|
|
|
|
|
@@ -166,6 +167,14 @@ public class OrgCloudServiceProvider extends ControllerSupport implements OrgClo
|
|
|
|
|
|
predicates.add(cb.greaterThanOrEqualTo(root.get("id"), start));
|
|
predicates.add(cb.greaterThanOrEqualTo(root.get("id"), start));
|
|
|
|
|
|
|
|
+ if (null != withoutParentId) {
|
|
|
|
+ if (withoutParentId) {
|
|
|
|
+ predicates.add(cb.isNull(root.get("parentId")));
|
|
|
|
+ } else {
|
|
|
|
+ predicates.add(cb.isNotNull(root.get("parentId")));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
if (null != enable) {
|
|
if (null != enable) {
|
|
predicates.add(cb.equal(root.get("enable"), enable));
|
|
predicates.add(cb.equal(root.get("enable"), enable));
|
|
}
|
|
}
|