package com.fs.hisStore.service.impl;

import java.util.List;
import com.fs.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.fs.hisStore.mapper.FsUserRechargeScrmMapper;
import com.fs.hisStore.domain.FsUserRechargeScrm;
import com.fs.hisStore.service.IFsUserRechargeScrmService;

/**
 * 用户充值Service业务层处理
 * 
 * @author fs
 * @date 2022-03-15
 */
@Service
public class FsUserRechargeScrmServiceImpl implements IFsUserRechargeScrmService 
{
    @Autowired
    private FsUserRechargeScrmMapper fsUserRechargeMapper;

    /**
     * 查询用户充值
     * 
     * @param id 用户充值ID
     * @return 用户充值
     */
    @Override
    public FsUserRechargeScrm selectFsUserRechargeById(Long id)
    {
        return fsUserRechargeMapper.selectFsUserRechargeById(id);
    }

    /**
     * 查询用户充值列表
     * 
     * @param fsUserRecharge 用户充值
     * @return 用户充值
     */
    @Override
    public List<FsUserRechargeScrm> selectFsUserRechargeList(FsUserRechargeScrm fsUserRecharge)
    {
        return fsUserRechargeMapper.selectFsUserRechargeList(fsUserRecharge);
    }

    /**
     * 新增用户充值
     * 
     * @param fsUserRecharge 用户充值
     * @return 结果
     */
    @Override
    public int insertFsUserRecharge(FsUserRechargeScrm fsUserRecharge)
    {
        fsUserRecharge.setCreateTime(DateUtils.getNowDate());
        return fsUserRechargeMapper.insertFsUserRecharge(fsUserRecharge);
    }

    /**
     * 修改用户充值
     * 
     * @param fsUserRecharge 用户充值
     * @return 结果
     */
    @Override
    public int updateFsUserRecharge(FsUserRechargeScrm fsUserRecharge)
    {
        fsUserRecharge.setUpdateTime(DateUtils.getNowDate());
        return fsUserRechargeMapper.updateFsUserRecharge(fsUserRecharge);
    }

    /**
     * 批量删除用户充值
     * 
     * @param ids 需要删除的用户充值ID
     * @return 结果
     */
    @Override
    public int deleteFsUserRechargeByIds(Long[] ids)
    {
        return fsUserRechargeMapper.deleteFsUserRechargeByIds(ids);
    }

    /**
     * 删除用户充值信息
     * 
     * @param id 用户充值ID
     * @return 结果
     */
    @Override
    public int deleteFsUserRechargeById(Long id)
    {
        return fsUserRechargeMapper.deleteFsUserRechargeById(id);
    }
}
