package com.ruoyi.bar.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bar.mapper.WyBarIconLogMapper;
import com.ruoyi.bar.domain.WyBarIconLog;
import com.ruoyi.bar.service.IWyBarIconLogService;

import javax.annotation.Resource;

/**
 * 酒吧啤酒币变动记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-10
 */
@Service
public class WyBarIconLogServiceImpl implements IWyBarIconLogService 
{
    @Resource
    private WyBarIconLogMapper wyBarIconLogMapper;

    /**
     * 查询酒吧啤酒币变动记录
     * 
     * @param id 酒吧啤酒币变动记录主键
     * @return 酒吧啤酒币变动记录
     */
    @Override
    public WyBarIconLog selectWyBarIconLogById(Long id)
    {
        return wyBarIconLogMapper.selectWyBarIconLogById(id);
    }

    @Override
    public Integer selectWyBarIconSum(WyBarIconLog wyBarIconLog){
        return wyBarIconLogMapper.selectWyBarIconSum(wyBarIconLog);
    }

    /**
     * 查询酒吧啤酒币变动记录列表
     * 
     * @param wyBarIconLog 酒吧啤酒币变动记录
     * @return 酒吧啤酒币变动记录
     */
    @Override
    public List<WyBarIconLog> selectWyBarIconLogList(WyBarIconLog wyBarIconLog)
    {
        return wyBarIconLogMapper.selectWyBarIconLogList(wyBarIconLog);
    }

    /**
     * 新增酒吧啤酒币变动记录
     * 
     * @param wyBarIconLog 酒吧啤酒币变动记录
     * @return 结果
     */
    @Override
    public int insertWyBarIconLog(WyBarIconLog wyBarIconLog)
    {
        wyBarIconLog.setCreateTime(DateUtils.getNowDate());
        return wyBarIconLogMapper.insertWyBarIconLog(wyBarIconLog);
    }

    /**
     * 修改酒吧啤酒币变动记录
     * 
     * @param wyBarIconLog 酒吧啤酒币变动记录
     * @return 结果
     */
    @Override
    public int updateWyBarIconLog(WyBarIconLog wyBarIconLog)
    {
        return wyBarIconLogMapper.updateWyBarIconLog(wyBarIconLog);
    }

    /**
     * 批量删除酒吧啤酒币变动记录
     * 
     * @param ids 需要删除的酒吧啤酒币变动记录主键
     * @return 结果
     */
    @Override
    public int deleteWyBarIconLogByIds(Long[] ids)
    {
        return wyBarIconLogMapper.deleteWyBarIconLogByIds(ids);
    }

    /**
     * 删除酒吧啤酒币变动记录信息
     * 
     * @param id 酒吧啤酒币变动记录主键
     * @return 结果
     */
    @Override
    public int deleteWyBarIconLogById(Long id)
    {
        return wyBarIconLogMapper.deleteWyBarIconLogById(id);
    }
}
