package com.yunzhupaas.permission.service;


import com.yunzhupaas.base.service.SuperService;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunzhupaas.base.Pagination;
import com.yunzhupaas.permission.entity.OrganizeAdministratorEntity;
import com.yunzhupaas.permission.entity.OrganizeEntity;
import com.yunzhupaas.permission.model.organizeadministrator.OrganizeAdministratorListVo;
import com.yunzhupaas.permission.model.organizeadministrator.OrganizeAdministratorModel;

import java.util.List;

/**
 *
 * 机构分级管理员
 * @author 云筑产品开发平台组
 * @version V3.1.0
 * @copyright 深圳市乐程软件有限公司
 * @date 2024-09-26 上午9:18
 */
public interface OrganizeAdministratorService extends SuperService<OrganizeAdministratorEntity> {



    /**
     * 获取 机构分级管理员信息
     * @param userId
     * @param organizeId
     * @return
     */
    OrganizeAdministratorEntity getOne(String userId, String organizeId);

    /**
     * 根据userId获取列表
     * @param userId
     * @return
     */
    List<OrganizeAdministratorEntity> getOrganizeAdministratorEntity(String userId);

    /**
     * 根据userId获取列表
     * @param userId
     * @param type  分管对象类型 PermissionConst.ORGANIZE、PermissionConst.SYSTEM {@link com.yunzhupaas.constant.PermissionConst}
     * @param filterMain
     * @return
     */
    List<OrganizeAdministratorEntity> getOrganizeAdministratorEntity(String userId, String type, boolean filterMain);

    /**
     * 根据userId获取列表
     * @param userId
     * @param type  分管对象类型 PermissionConst.ORGANIZE、PermissionConst.SYSTEM {@link com.yunzhupaas.constant.PermissionConst}
     * @return
     */
    List<OrganizeAdministratorEntity> getOrganizeAdministratorEntity(String userId, String type);

    /**
     * 新建
     * @param entity  实体对象
     */
    void create(OrganizeAdministratorEntity entity);

    /**
     * 新建
     * @param list
     */
    void createList(List<OrganizeAdministratorEntity> list, String userId);

    /**
     * 更新
     * @param id     主键值
     * @param entity 实体对象
     */
    boolean update(String id, OrganizeAdministratorEntity entity);

    /**
     * 删除
     * @param userId 用户id
     */
    boolean deleteByUserId(String userId);

    /**
     * 删除
     * @param entity 实体对象
     */
    void delete(OrganizeAdministratorEntity entity);

    /**
     * 通过UserId获取权限组名称
     *
     * @param userId 主键值
     * @return
     */
    String getManagerGroupByUserId(String userId);

    /**
     * 获取 OrganizeAdminIsTratorEntity 信息
     * @param userId 主键值
     * @return
     */
    List<OrganizeAdministratorEntity> getInfoByUserId(String userId);

    /**
     * 获取 OrganizeAdminIsTratorEntity 信息
     * @param id 主键值
     * @return
     */
    OrganizeAdministratorEntity getInfo(String id);

    /**
     * 获取 OrganizeAdminIsTratorEntity 信息
     * @param organizeId 机构主键值
     * @return
     */
    OrganizeAdministratorEntity getInfoByOrganizeId(String organizeId);

    /**
     * 获取 OrganizeAdminIsTratorEntity 列表
     * @param organizeIdList 机构主键值
     * @return
     */
    List<OrganizeAdministratorEntity> getListByOrganizeId(List<String> organizeIdList);

    /**
     * 获取二级管理员列表
     *
     * @param pagination 分页参数
     * @return
     */
    List<OrganizeAdministratorListVo> getList(Pagination pagination);

    List<String> getOrganizeUserList(String type);

    List<OrganizeEntity> getListByAuthorize();

    OrganizeAdministratorModel getOrganizeAdministratorList();
}

