package com.ruoyi.model.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.model.mapper.AppWithdrawalConfigMapper;
import com.ruoyi.model.domain.AppWithdrawalConfig;
import com.ruoyi.model.service.IAppWithdrawalConfigService;

/**
 * 钱包提现配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-08
 */
@Service
public class AppWithdrawalConfigServiceImpl implements IAppWithdrawalConfigService 
{
    @Autowired
    private AppWithdrawalConfigMapper appWithdrawalConfigMapper;

    /**
     * 查询钱包提现配置
     * 
     * @param id 钱包提现配置主键
     * @return 钱包提现配置
     */
    @Override
    public AppWithdrawalConfig selectAppWithdrawalConfigById(Long id)
    {
        return appWithdrawalConfigMapper.selectAppWithdrawalConfigById(id);
    }

    /**
     * 查询钱包提现配置列表
     * 
     * @param appWithdrawalConfig 钱包提现配置
     * @return 钱包提现配置
     */
    @Override
    public List<AppWithdrawalConfig> selectAppWithdrawalConfigList(AppWithdrawalConfig appWithdrawalConfig)
    {
        return appWithdrawalConfigMapper.selectAppWithdrawalConfigList(appWithdrawalConfig);
    }

    /**
     * 新增钱包提现配置
     * 
     * @param appWithdrawalConfig 钱包提现配置
     * @return 结果
     */
    @Override
    public int insertAppWithdrawalConfig(AppWithdrawalConfig appWithdrawalConfig)
    {
        appWithdrawalConfig.setCreateTime(DateUtils.getNowDate());
        return appWithdrawalConfigMapper.insertAppWithdrawalConfig(appWithdrawalConfig);
    }

    /**
     * 修改钱包提现配置
     * 
     * @param appWithdrawalConfig 钱包提现配置
     * @return 结果
     */
    @Override
    public int updateAppWithdrawalConfig(AppWithdrawalConfig appWithdrawalConfig)
    {
        appWithdrawalConfig.setUpdateTime(DateUtils.getNowDate());
        return appWithdrawalConfigMapper.updateAppWithdrawalConfig(appWithdrawalConfig);
    }

    /**
     * 批量删除钱包提现配置
     * 
     * @param ids 需要删除的钱包提现配置主键
     * @return 结果
     */
    @Override
    public int deleteAppWithdrawalConfigByIds(Long[] ids)
    {
        return appWithdrawalConfigMapper.deleteAppWithdrawalConfigByIds(ids);
    }

    /**
     * 删除钱包提现配置信息
     * 
     * @param id 钱包提现配置主键
     * @return 结果
     */
    @Override
    public int deleteAppWithdrawalConfigById(Long id)
    {
        return appWithdrawalConfigMapper.deleteAppWithdrawalConfigById(id);
    }

    @Override
    public AppWithdrawalConfig getAppWithdrawalConfig() {
        return appWithdrawalConfigMapper.getAppWithdrawalConfig();
    }
}
