package com.ff.game.service.impl;

import java.util.List;
import com.ff.base.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ff.game.mapper.GameExchangeMoneyMapper;
import com.ff.game.domain.GameExchangeMoney;
import com.ff.game.service.IGameExchangeMoneyService;

/**
 * 会员金额转移记录Service业务层处理
 *
 * @author shi
 * @date 2025-02-10
 */
@Service
public class GameExchangeMoneyServiceImpl implements IGameExchangeMoneyService
{
    @Autowired
    private GameExchangeMoneyMapper gameExchangeMoneyMapper;

    /**
     * 查询会员金额转移记录
     *
     * @param id 会员金额转移记录主键
     * @return 会员金额转移记录
     */
    @Override
    public GameExchangeMoney selectGameExchangeMoneyById(Long id)
    {
        return gameExchangeMoneyMapper.selectGameExchangeMoneyById(id);
    }

    /**
     * 查询会员金额转移记录列表
     *
     * @param gameExchangeMoney 会员金额转移记录
     * @return 会员金额转移记录
     */
    @Override
    public List<GameExchangeMoney> selectGameExchangeMoneyList(GameExchangeMoney gameExchangeMoney)
    {
        return gameExchangeMoneyMapper.selectGameExchangeMoneyList(gameExchangeMoney);
    }

    /**
     * 新增会员金额转移记录
     *
     * @param gameExchangeMoney 会员金额转移记录
     * @return 结果
     */
    @Override
    public int insertGameExchangeMoney(GameExchangeMoney gameExchangeMoney)
    {
        gameExchangeMoney.setCreateTime(DateUtils.getNowDate());
        return gameExchangeMoneyMapper.insertGameExchangeMoney(gameExchangeMoney);
    }

    /**
     * 修改会员金额转移记录
     *
     * @param gameExchangeMoney 会员金额转移记录
     * @return 结果
     */
    @Override
    public int updateGameExchangeMoney(GameExchangeMoney gameExchangeMoney)
    {
        gameExchangeMoney.setUpdateTime(DateUtils.getNowDate());
        return gameExchangeMoneyMapper.updateGameExchangeMoney(gameExchangeMoney);
    }

    /**
     * 批量删除会员金额转移记录
     *
     * @param ids 需要删除的会员金额转移记录主键
     * @return 结果
     */
    @Override
    public int deleteGameExchangeMoneyByIds(Long[] ids)
    {
        return gameExchangeMoneyMapper.deleteGameExchangeMoneyByIds(ids);
    }

    /**
     * 删除会员金额转移记录信息
     *
     * @param id 会员金额转移记录主键
     * @return 结果
     */
    @Override
    public int deleteGameExchangeMoneyById(Long id)
    {
        return gameExchangeMoneyMapper.deleteGameExchangeMoneyById(id);
    }
}
