package com.yanzhu.system.service.impl;

import java.util.List;

import com.yanzhu.system.api.domain.SysUserUniopen;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yanzhu.system.mapper.SysUserUniopenMapper;
import com.yanzhu.system.service.ISysUserUniopenService;

/**
 * 用户授权Service业务层处理
 * 
 * @author JiangYuQi
 * @date 2024-10-13
 */
@Service
public class SysUserUniopenServiceImpl implements ISysUserUniopenService 
{
    @Autowired
    private SysUserUniopenMapper sysUserUniopenMapper;

    /**
     * 查询用户授权
     * 
     * @param id 用户授权主键
     * @return 用户授权
     */
    @Override
    public SysUserUniopen selectSysUserUniopenById(Long id)
    {
        return sysUserUniopenMapper.selectSysUserUniopenById(id);
    }

    /**
     * 查询用户授权列表
     *
     * @param userId 用户主键
     * @return 用户授权集合
     */
    @Override
    public List<SysUserUniopen> selectSysUserUniopenByUserId(Long userId){
        return sysUserUniopenMapper.selectSysUserUniopenByUserId(userId);
    }

    /**
     * 查询用户授权列表
     *
     * @param userName 用户名称
     * @return 用户授权集合
     */
    @Override
    public List<SysUserUniopen> selectSysUserUniopenByUserName(String userName){
        return sysUserUniopenMapper.selectSysUserUniopenByUserName(userName);
    }

    /**
     * 查询用户授权
     *
     * @param unionid 唯一关联id
     * @return 用户授权集合
     */
    @Override
    public SysUserUniopen selectSysUserUniopenByUnionid(String unionid){
        return sysUserUniopenMapper.selectSysUserUniopenByUnionid(unionid);
    }

    /**
     * 查询用户授权
     *
     * @param maOpenId 小程序授权id
     * @return 用户授权集合
     */
    @Override
    public SysUserUniopen selectSysUserUniopenByMaOpenId(String maOpenId){
        return sysUserUniopenMapper.selectSysUserUniopenByMaOpenId(maOpenId);
    }

    /**
     * 查询用户授权
     *
     * @param mpOpenId 公众号授权id
     * @return 用户授权集合
     */
    @Override
    public SysUserUniopen selectSysUserUniopenByMpOpenId(String mpOpenId){
        return sysUserUniopenMapper.selectSysUserUniopenByMpOpenId(mpOpenId);
    }

    /**
     * 查询用户授权列表
     * 
     * @param sysUserUniopen 用户授权
     * @return 用户授权
     */
    @Override
    public List<SysUserUniopen> selectSysUserUniopenList(SysUserUniopen sysUserUniopen)
    {
        return sysUserUniopenMapper.selectSysUserUniopenList(sysUserUniopen);
    }

    /**
     * 新增用户授权
     * 
     * @param sysUserUniopen 用户授权
     * @return 结果
     */
    @Override
    public int insertSysUserUniopen(SysUserUniopen sysUserUniopen)
    {
        return sysUserUniopenMapper.insertSysUserUniopen(sysUserUniopen);
    }

    /**
     * 修改用户授权
     * 
     * @param sysUserUniopen 用户授权
     * @return 结果
     */
    @Override
    public int updateSysUserUniopen(SysUserUniopen sysUserUniopen)
    {
        return sysUserUniopenMapper.updateSysUserUniopen(sysUserUniopen);
    }

    /**
     * 批量删除用户授权
     * 
     * @param ids 需要删除的用户授权主键
     * @return 结果
     */
    @Override
    public int deleteSysUserUniopenByIds(Long[] ids)
    {
        return sysUserUniopenMapper.deleteSysUserUniopenByIds(ids);
    }

    /**
     * 删除用户授权信息
     * 
     * @param id 用户授权主键
     * @return 结果
     */
    @Override
    public int deleteSysUserUniopenById(Long id)
    {
        return sysUserUniopenMapper.deleteSysUserUniopenById(id);
    }
}
