package com.willalp.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.willalp.system.domain.SysUserOrganization;
import com.willalp.system.domain.resp.OrganizationListResp;

import java.util.List;


/**
 * 用户机构Mapper接口
 *
 * @author willalp
 * @date 2021-12-23
 */
public interface SysUserOrganizationMapper extends BaseMapper<SysUserOrganization> {

    /**
     * 查询用户机构列表
     *
     * @param sysUserOrganization 用户机构
     * @return 用户机构集合
     */
    public List<SysUserOrganization> selectSysUserOrganizationList(SysUserOrganization sysUserOrganization);

    /**
     * 根据userId查询用户机构信息
     *
     * @param userId
     * @return
     */
    List<SysUserOrganization> queryOrganizationByUserId(Long userId);

    /**
     * app获取用户机构信息
     *
     * @param userName
     * @return
     */
    List<OrganizationListResp> getOrganizationByUserName(String userName);

    List<SysUserOrganization> queryOrganizationByLoginName(String loginName);
}
