package com.sunyard.ssp.modules.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sunyard.ssp.modules.user.entity.ScDepartment;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author tsz
 * @since 2020-03-12
 */
public interface IScDepartmentService extends IService<ScDepartment> {

     /**
     * 通过父id获取 升序
     * @param parentId
     * @param openDataFilter 是否开启数据权限
     * @return
     */
    List<ScDepartment> findByParentIdOrderBySortOrder(Long parentId, Boolean openDataFilter);

    /**
     * 通过父id和状态获取
     * @param parentId
     * @param status
     * @return
     */
    List<ScDepartment> findByParentIdAndStatusOrderBySortOrder(Long parentId, Integer status);

    /**
     * 部门名模糊搜索 升序
     * @param title
     * @param openDataFilter 是否开启数据权限
     * @return
     */
    List<ScDepartment> findByTitleLikeOrderBySortOrder(String title, Boolean openDataFilter);
}
