package com.ruoyi.framework.recovery.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.framework.recovery.mapper.WxRechargeMapper;
import com.ruoyi.framework.recovery.domain.WxRecharge;
import com.ruoyi.framework.recovery.service.IWxRechargeService;

/**
 * 充值Service业务层处理
 *
 * @author jin
 * @date 2024-12-01
 */
@Service
public class WxRechargeServiceImpl implements IWxRechargeService
{
    @Autowired
    private WxRechargeMapper wxRechargeMapper;

    /**
     * 查询充值
     *
     * @param id 充值主键
     * @return 充值
     */
    @Override
    public WxRecharge selectWxRechargeById(Long id)
    {
        return wxRechargeMapper.selectWxRechargeById(id);
    }

    /**
     * 查询充值列表
     *
     * @param wxRecharge 充值
     * @return 充值
     */
    @Override
    public List<WxRecharge> selectWxRechargeList(WxRecharge wxRecharge)
    {
        return wxRechargeMapper.selectWxRechargeList(wxRecharge);
    }

    /**
     * 新增充值
     *
     * @param wxRecharge 充值
     * @return 结果
     */
    @Override
    public int insertWxRecharge(WxRecharge wxRecharge)
    {
        wxRecharge.setCreateTime(new Date());
        return wxRechargeMapper.insertWxRecharge(wxRecharge);
    }

    /**
     * 修改充值
     *
     * @param wxRecharge 充值
     * @return 结果
     */
    @Override
    public int updateWxRecharge(WxRecharge wxRecharge)
    {
        return wxRechargeMapper.updateWxRecharge(wxRecharge);
    }

    /**
     * 批量删除充值
     *
     * @param ids 需要删除的充值主键
     * @return 结果
     */
    @Override
    public int deleteWxRechargeByIds(Long[] ids)
    {
        return wxRechargeMapper.deleteWxRechargeByIds(ids);
    }

    /**
     * 删除充值信息
     *
     * @param id 充值主键
     * @return 结果
     */
    @Override
    public int deleteWxRechargeById(Long id)
    {
        return wxRechargeMapper.deleteWxRechargeById(id);
    }
}
