mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +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.Id;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import org.apache.mybatis.jpa.persistence.JpaBaseEntity;
|
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
|
@Entity
|
||||||
@Table(name = "MXK_ORGANIZATIONS")
|
@Table(name = "MXK_ORGANIZATIONS")
|
||||||
public class Organizations extends JpaBaseEntity implements Serializable {
|
public class Organizations extends JpaBaseEntity implements Serializable {
|
||||||
|
|||||||
@ -171,7 +171,11 @@ public class OrganizationsController {
|
|||||||
treeNode.setLeaf(true);
|
treeNode.setLeaf(true);
|
||||||
treeAttributes.addNode(treeNode);
|
treeAttributes.addNode(treeNode);
|
||||||
nodeCount ++;
|
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.setExpanded(true);
|
||||||
treeNode.setLeaf(false);
|
treeNode.setLeaf(false);
|
||||||
treeAttributes.setRootNode(treeNode);
|
treeAttributes.setRootNode(treeNode);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user