package com.app.admin.framework.system.organization.service;

import com.app.admin.framework.system.organization.model.SysOrganization;
import com.app.admin.framework.system.organization.view.SysOrganizationView;
import com.app.framework.core.support.auth.LoginUser;
import com.app.framework.core.support.service.CrudBaseService;
import com.app.framework.core.support.view.tree.ExTreeNode;

import java.util.List;

/**
 * 组织机构管理
 */
public interface SysOrganizationService extends CrudBaseService<SysOrganization> {

    /**
     * 保存组织机构
     *
     * @param view 组织机构对象
     */
    SysOrganization saveOrganization(SysOrganizationView view, LoginUser loginUser);

    /**
     * 查询机构树
     *
     * @param parentId
     * @return
     */
    List<ExTreeNode> listTree(Long parentId);

}