package com.yeejoin.amos.boot.module.hygf.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;

import com.yeejoin.amos.boot.module.hygf.api.dto.CompanyDtoUserDto;
import com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.PersonnelBusiness;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 人员业务信息表 Mapper 接口
 *
 * @author system_generator
 * @date 2023-09-01
 */
public interface PersonnelBusinessMapper extends BaseMapper<PersonnelBusiness> {
    IPage<CompanyDtoUserDto> getCompanyDtoUserDtopage(@Param("dto") CompanyDtoUserDto dto);

    Map<String, String> getorgcode(@Param("id") Long id);

    //根据平台userid  获取人员所属经销商
    UserUnitInformationDto getUserUnitInformationDto(@Param("userId") String userId);


    //根据平台userid  获取运维人员信息
    UserUnitInformationDto getMaintenanceUserUnitInformationDto(@Param("userId") String userId);


    String selectUserInfo(Long sequenceNbr);

    void deletePauByUserId(String userId);

    void deletePguByUserId(String userId);

    void deleteRoleByUserId(@Param("userId") String userId, @Param("roleId") Long roleId);

    void deleteSubByUserId(String userId);

    void deleteHpbByFoundationId(Long sequenceNbr);

    void deleteSueByUserId(String userId);

    void deleteAliByUserId(String userId);

    List<String> selectHygfTableName();

    int countByUserId(@Param("tableName") String tableName, @Param("userId") String userId);

    void deleteOrgRoleByUserId(@Param("userId") String userId, @Param("roleId") Long roleId);
}
