package com.willalp.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.willalp.system.domain.SysUserOrganization;
import com.willalp.system.domain.resp.OrganizationListResp;
import com.willalp.system.mapper.SysUserOrganizationMapper;
import com.willalp.system.service.ISysUserOrganizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户机构Service业务层处理
 *
 * @author willalp
 * @date 2021-12-23
 */
@Service
public class SysUserOrganizationServiceImpl extends ServiceImpl<SysUserOrganizationMapper, SysUserOrganization> implements ISysUserOrganizationService {
    @Autowired
    private SysUserOrganizationMapper sysUserOrganizationMapper;

    /**
     * 查询用户机构列表
     *
     * @param sysUserOrganization 用户机构
     * @return 用户机构
     */
    @Override
    public List<SysUserOrganization> selectSysUserOrganizationList(SysUserOrganization sysUserOrganization) {
        return sysUserOrganizationMapper.selectSysUserOrganizationList(sysUserOrganization);
    }

    @Override
    public List<SysUserOrganization> queryOrganizationByUserId(Long userId) {
        return sysUserOrganizationMapper.queryOrganizationByUserId(userId);
    }

    @Override
    public List<OrganizationListResp> getOrganizationByUserName(String userName) {
        return sysUserOrganizationMapper.getOrganizationByUserName(userName);
    }


}
