package com.ruoyi.brewery.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.brewery.mapper.WyBreweryUserRoleMapper;
import com.ruoyi.common.core.domain.entity.WyBreweryUserRole;
import com.ruoyi.brewery.service.IWyBreweryUserRoleService;

/**
 * 品牌方用户和角色关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-22
 */
@Service
public class WyBreweryUserRoleServiceImpl implements IWyBreweryUserRoleService 
{
    @Autowired
    private WyBreweryUserRoleMapper wyBreweryUserRoleMapper;

    /**
     * 查询品牌方用户和角色关联
     * 
     * @param userId 品牌方用户和角色关联主键
     * @return 品牌方用户和角色关联
     */
    @Override
    public WyBreweryUserRole selectWyBreweryUserRoleByUserId(Long userId)
    {
        return wyBreweryUserRoleMapper.selectWyBreweryUserRoleByUserId(userId);
    }

    /**
     * 查询品牌方用户和角色关联列表
     * 
     * @param wyBreweryUserRole 品牌方用户和角色关联
     * @return 品牌方用户和角色关联
     */
    @Override
    public List<WyBreweryUserRole> selectWyBreweryUserRoleList(WyBreweryUserRole wyBreweryUserRole)
    {
        return wyBreweryUserRoleMapper.selectWyBreweryUserRoleList(wyBreweryUserRole);
    }

    /**
     * 新增品牌方用户和角色关联
     * 
     * @param wyBreweryUserRole 品牌方用户和角色关联
     * @return 结果
     */
    @Override
    public int insertWyBreweryUserRole(WyBreweryUserRole wyBreweryUserRole)
    {
        return wyBreweryUserRoleMapper.insertWyBreweryUserRole(wyBreweryUserRole);
    }

    /**
     * 修改品牌方用户和角色关联
     * 
     * @param wyBreweryUserRole 品牌方用户和角色关联
     * @return 结果
     */
    @Override
    public int updateWyBreweryUserRole(WyBreweryUserRole wyBreweryUserRole)
    {
        return wyBreweryUserRoleMapper.updateWyBreweryUserRole(wyBreweryUserRole);
    }

    /**
     * 批量删除品牌方用户和角色关联
     * 
     * @param userIds 需要删除的品牌方用户和角色关联主键
     * @return 结果
     */
    @Override
    public int deleteWyBreweryUserRoleByUserIds(Long[] userIds)
    {
        return wyBreweryUserRoleMapper.deleteWyBreweryUserRoleByUserIds(userIds);
    }

    /**
     * 删除品牌方用户和角色关联信息
     * 
     * @param userId 品牌方用户和角色关联主键
     * @return 结果
     */
    @Override
    public int deleteWyBreweryUserRoleByUserId(Long userId)
    {
        return wyBreweryUserRoleMapper.deleteWyBreweryUserRoleByUserId(userId);
    }
}
