package com.dgtly.system.mapper;

import com.dgtly.system.domain.SysUserOrderAuthor;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 权限Mapper接口
 * 
 * @author dgtly
 * @date 2022-03-22
 */
public interface SysUserOrderAuthorMapper 
{
    /**
     * 查询权限
     * 
     * @param authorId 权限ID
     * @return 权限
     */
    public SysUserOrderAuthor selectSysUserOrderAuthorById(Long authorId);

    /**
     * 查询权限列表
     * 
     * @param sysUserOrderAuthor 权限
     * @return 权限集合
     */
    public List<SysUserOrderAuthor> selectSysUserOrderAuthorList(SysUserOrderAuthor sysUserOrderAuthor);

    public List<Long> selectAuthorTree(@Param("userId")Long userId);

    /**
     * 新增权限
     * 
     * @param sysUserOrderAuthor 权限
     * @return 结果
     */
    public int insertSysUserOrderAuthor(SysUserOrderAuthor sysUserOrderAuthor);

    /**
     * 修改权限
     * 
     * @param sysUserOrderAuthor 权限
     * @return 结果
     */
    public int updateSysUserOrderAuthor(SysUserOrderAuthor sysUserOrderAuthor);

    /**
     * 删除权限
     * 
     * @param authorId 权限ID
     * @return 结果
     */
    public int deleteSysUserOrderAuthorById(Long authorId);

    /**
     * 批量删除权限
     * 
     * @param authorIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteSysUserOrderAuthorByIds(String[] authorIds);

    public List<SysUserOrderAuthor> selectAuthorIdByCode(@Param("code")String code,@Param("divisionCode")String divisionCode);

    public List<SysUserOrderAuthor> selectAuthorIdByParentId(Long parentId);

    public List<SysUserOrderAuthor> selectByParentId(@Param("authorList") List<Long> authorList);

    //public List<SysUserOrderAuthor> selectAuthorIdByParentId(List<Long> authorList);
}
