package com.ruoyi.mall.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.mall.mapper.MallMemberRateMapper;
import com.ruoyi.mall.domain.MallMemberRate;
import com.ruoyi.mall.service.IMallMemberRateService;

/**
 * 用户录取率Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-13
 */
@Service
public class MallMemberRateServiceImpl implements IMallMemberRateService 
{
    @Autowired
    private MallMemberRateMapper mallMemberRateMapper;

    /**
     * 查询用户录取率
     * 
     * @param rateId 用户录取率主键
     * @return 用户录取率
     */
    @Override
    public MallMemberRate selectMallMemberRateByRateId(Long rateId)
    {
        return mallMemberRateMapper.selectMallMemberRateByRateId(rateId);
    }

    /**
     * 查询用户录取率列表
     * 
     * @param mallMemberRate 用户录取率
     * @return 用户录取率
     */
    @Override
    public List<MallMemberRate> selectMallMemberRateList(MallMemberRate mallMemberRate)
    {
        return mallMemberRateMapper.selectMallMemberRateList(mallMemberRate);
    }

    /**
     * 新增用户录取率
     * 
     * @param mallMemberRate 用户录取率
     * @return 结果
     */
    @Override
    public int insertMallMemberRate(MallMemberRate mallMemberRate)
    {
        mallMemberRate.setCreateTime(DateUtils.getNowDate());
        return mallMemberRateMapper.insertMallMemberRate(mallMemberRate);
    }

    /**
     * 修改用户录取率
     * 
     * @param mallMemberRate 用户录取率
     * @return 结果
     */
    @Override
    public int updateMallMemberRate(MallMemberRate mallMemberRate)
    {
        mallMemberRate.setUpdateTime(DateUtils.getNowDate());
        return mallMemberRateMapper.updateMallMemberRate(mallMemberRate);
    }

    /**
     * 批量删除用户录取率
     * 
     * @param rateIds 需要删除的用户录取率主键
     * @return 结果
     */
    @Override
    public int deleteMallMemberRateByRateIds(Long[] rateIds)
    {
        return mallMemberRateMapper.deleteMallMemberRateByRateIds(rateIds);
    }

    /**
     * 删除用户录取率信息
     * 
     * @param rateId 用户录取率主键
     * @return 结果
     */
    @Override
    public int deleteMallMemberRateByRateId(Long rateId)
    {
        return mallMemberRateMapper.deleteMallMemberRateByRateId(rateId);
    }
}
