package com.ruoyi.model.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.model.mapper.WalletMapper;
import com.ruoyi.model.domain.Wallet;
import com.ruoyi.model.service.IWalletService;

/**
 * 钱包Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-05
 */
@Service
public class WalletServiceImpl implements IWalletService 
{
    @Autowired
    private WalletMapper walletMapper;

    /**
     * 查询钱包
     * 
     * @param id 钱包主键
     * @return 钱包
     */
    @Override
    public Wallet selectWalletById(Long id)
    {
        return walletMapper.selectWalletById(id);
    }

    /**
     * 查询钱包列表
     * 
     * @param wallet 钱包
     * @return 钱包
     */
    @Override
    public List<Wallet> selectWalletList(Wallet wallet)
    {
        return walletMapper.selectWalletList(wallet);
    }

    /**
     * 新增钱包
     * 
     * @param wallet 钱包
     * @return 结果
     */
    @Override
    public int insertWallet(Wallet wallet)
    {
        return walletMapper.insertWallet(wallet);
    }

    /**
     * 修改钱包
     * 
     * @param wallet 钱包
     * @return 结果
     */
    @Override
    public int updateWallet(Wallet wallet)
    {
        return walletMapper.updateWallet(wallet);
    }

    /**
     * 批量删除钱包
     * 
     * @param ids 需要删除的钱包主键
     * @return 结果
     */
    @Override
    public int deleteWalletByIds(Long[] ids)
    {
        return walletMapper.deleteWalletByIds(ids);
    }

    /**
     * 删除钱包信息
     * 
     * @param id 钱包主键
     * @return 结果
     */
    @Override
    public int deleteWalletById(Long id)
    {
        return walletMapper.deleteWalletById(id);
    }

    @Override
    public List<Wallet> getWalletList() {
        return walletMapper.getWalletList();
    }
}
