package com.game.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.game.business.mapper.AppGameMoneyMapper;
import com.game.business.domain.AppGameMoney;
import com.game.business.service.IAppGameMoneyService;
import com.game.common.annotation.DataSource;
import com.game.common.enums.DataSourceType;

/**
 * 游戏投注金额Service业务层处理
 *
 * @author game
 * @date 2024-08-29
 */
@Service
public class AppGameMoneyServiceImpl extends ServiceImpl<AppGameMoneyMapper, AppGameMoney> implements IAppGameMoneyService {
    @Autowired
    private AppGameMoneyMapper appGameMoneyMapper;

    /**
     * 查询游戏投注金额
     *
     * @param id 游戏投注金额主键
     * @return 游戏投注金额
     */
    @Override
    @DataSource(DataSourceType.SLAVE)
    public AppGameMoney selectAppGameMoneyById(Long id) {
        return appGameMoneyMapper.selectAppGameMoneyById(id);
    }

    /**
     * 查询游戏投注金额列表
     *
     * @param appGameMoney 游戏投注金额
     * @return 游戏投注金额
     */
    @Override
    @DataSource(DataSourceType.SLAVE)
    public List<AppGameMoney> selectAppGameMoneyList(AppGameMoney appGameMoney) {
        return appGameMoneyMapper.selectAppGameMoneyList(appGameMoney);
    }

    /**
     * 新增游戏投注金额
     *
     * @param appGameMoney 游戏投注金额
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVE)
    public int insertAppGameMoney(AppGameMoney appGameMoney) {
            return appGameMoneyMapper.insertAppGameMoney(appGameMoney);
    }

    /**
     * 修改游戏投注金额
     *
     * @param appGameMoney 游戏投注金额
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVE)
    public int updateAppGameMoney(AppGameMoney appGameMoney) {
        return appGameMoneyMapper.updateAppGameMoney(appGameMoney);
    }

    /**
     * 批量删除游戏投注金额
     *
     * @param ids 需要删除的游戏投注金额主键
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVE)
    public int deleteAppGameMoneyByIds(Long[] ids) {
        return appGameMoneyMapper.deleteAppGameMoneyByIds(ids);
    }

    /**
     * 删除游戏投注金额信息
     *
     * @param id 游戏投注金额主键
     * @return 结果
     */
    @Override
    @DataSource(DataSourceType.SLAVE)
    public int deleteAppGameMoneyById(Long id) {
        return appGameMoneyMapper.deleteAppGameMoneyById(id);
    }
}