package com.ruoyi.bar.service.impl;

import java.util.List;

import com.ruoyi.common.core.domain.entity.WyBarUserRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bar.mapper.WyBarUserRoleMapper;
import com.ruoyi.bar.service.IWyBarUserRoleService;

/**
 * 品牌方用户和角色关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-04
 */
@Service
public class WyBarUserRoleServiceImpl implements IWyBarUserRoleService 
{
    @Autowired
    private WyBarUserRoleMapper wyBarUserRoleMapper;

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

    /**
     * 查询品牌方用户和角色关联列表
     * 
     * @param wyBarUserRole 品牌方用户和角色关联
     * @return 品牌方用户和角色关联
     */
    @Override
    public List<WyBarUserRole> selectWyBarUserRoleList(WyBarUserRole wyBarUserRole)
    {
        return wyBarUserRoleMapper.selectWyBarUserRoleList(wyBarUserRole);
    }

    /**
     * 新增品牌方用户和角色关联
     * 
     * @param wyBarUserRole 品牌方用户和角色关联
     * @return 结果
     */
    @Override
    public int insertWyBarUserRole(WyBarUserRole wyBarUserRole)
    {
        return wyBarUserRoleMapper.insertWyBarUserRole(wyBarUserRole);
    }

    /**
     * 修改品牌方用户和角色关联
     * 
     * @param wyBarUserRole 品牌方用户和角色关联
     * @return 结果
     */
    @Override
    public int updateWyBarUserRole(WyBarUserRole wyBarUserRole)
    {
        return wyBarUserRoleMapper.updateWyBarUserRole(wyBarUserRole);
    }

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

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