package jnpf.authority.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.base.vo.PageListVO;
import jnpf.exception.LoginException;
import jnpf.model.authority.dto.authorize.FtbPermissionAuthorizeVO;
import jnpf.model.authority.dto.menu.FuntionMenuDTO;
import jnpf.model.authority.dto.person.FtbPermissionRoleBatchDeleteDTO;
import jnpf.model.authority.dto.person.FtbPermissionRolePersonAddDTO;
import jnpf.model.authority.dto.person.FtbPermissionRolePersonRelationDTO;
import jnpf.model.authority.po.FtbPermissionRoleAuthorizePerson;
import jnpf.model.authority.vo.person.FtbAuthorizedPersonnelVO;
import jnpf.model.authority.vo.person.FtbEmployeePermissionPersonnelVO;
import jnpf.model.authority.vo.person.FtbRoleListDropDownVO;
import jnpf.model.authority.vo.person.FunctionVO;

import java.util.List;

/**
*
*
*@Author: peng.hao
*@create: 2025/3/5
*
*/
public interface FtbPermissionRoleAuthorizePersonService extends IService<FtbPermissionRoleAuthorizePerson> {


    PageListVO<FtbAuthorizedPersonnelVO> authorizedPersonnel(Page<FtbAuthorizedPersonnelVO> page, String roleId);

    PageListVO<FtbEmployeePermissionPersonnelVO> employeePermission(Page<FtbEmployeePermissionPersonnelVO> page, String userName, List<String> userIds);

    List<FtbRoleListDropDownVO> roleListDropDown(String userId);

    void editEmployeePermission(List<String> roleIds, String userId);

    void add(FtbPermissionRolePersonAddDTO rolePersonAddDTO);

    void batchDelete(FtbPermissionRoleBatchDeleteDTO rolePersonDeleteDTO);

    List<String> getRoleIdsByUserId(FtbPermissionAuthorizeVO vo);

    /**
     * 删除员工所有权限
     */
    void deleteEmployeeAllPermission(List<String> userIds);

    List<FtbRoleListDropDownVO> allRolesOfTheCurrentPerson(String userId, String tenantId);

    void addPersonalPermission(FtbPermissionRolePersonRelationDTO rolePersonAddDTO);

    List<FunctionVO> getPersonalPermission(String userId);

    List<String> queryButtonPermission(FuntionMenuDTO funtion) throws LoginException;
}
