mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-06 17:08:29 +08:00
root organization node
This commit is contained in:
parent
e6458bf9aa
commit
a8d5665e14
@ -25,6 +25,13 @@ import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
|
||||
|
||||
/**
|
||||
* root organization node,<br> id = instId or id = parentId or parentId = -1 or parentId = 0
|
||||
* @author crystal.sea
|
||||
*
|
||||
*/
|
||||
|
||||
@Entity
|
||||
@Table(name = "MXK_ORGANIZATIONS")
|
||||
public class Organizations extends JpaBaseEntity implements Serializable {
|
||||
|
||||
@ -171,7 +171,11 @@ public class OrganizationsController {
|
||||
treeNode.setLeaf(true);
|
||||
treeAttributes.addNode(treeNode);
|
||||
nodeCount ++;
|
||||
if(org.getId().equalsIgnoreCase(currentUser.getInstId())) {
|
||||
//root organization node, id = instId or id = parentId or parentId = -1 or parentId = 0
|
||||
if(org.getId().equalsIgnoreCase(currentUser.getInstId())
|
||||
||org.getId().equalsIgnoreCase(org.getParentId())
|
||||
||org.getParentId().equalsIgnoreCase("0")
|
||||
||org.getParentId().equalsIgnoreCase("-1")) {
|
||||
treeNode.setExpanded(true);
|
||||
treeNode.setLeaf(false);
|
||||
treeAttributes.setRootNode(treeNode);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user