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.MallMemberRateSchoolMapper;
import com.ruoyi.mall.domain.MallMemberRateSchool;
import com.ruoyi.mall.service.IMallMemberRateSchoolService;

/**
 * 用户学校录取率Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-15
 */
@Service
public class MallMemberRateSchoolServiceImpl implements IMallMemberRateSchoolService 
{
    @Autowired
    private MallMemberRateSchoolMapper mallMemberRateSchoolMapper;

    /**
     * 查询用户学校录取率
     * 
     * @param rateSchoolId 用户学校录取率主键
     * @return 用户学校录取率
     */
    @Override
    public MallMemberRateSchool selectMallMemberRateSchoolByRateSchoolId(Long rateSchoolId)
    {
        return mallMemberRateSchoolMapper.selectMallMemberRateSchoolByRateSchoolId(rateSchoolId);
    }

    /**
     * 查询用户学校录取率列表
     * 
     * @param mallMemberRateSchool 用户学校录取率
     * @return 用户学校录取率
     */
    @Override
    public List<MallMemberRateSchool> selectMallMemberRateSchoolList(MallMemberRateSchool mallMemberRateSchool)
    {
        return mallMemberRateSchoolMapper.selectMallMemberRateSchoolList(mallMemberRateSchool);
    }

    /**
     * 新增用户学校录取率
     * 
     * @param mallMemberRateSchool 用户学校录取率
     * @return 结果
     */
    @Override
    public int insertMallMemberRateSchool(MallMemberRateSchool mallMemberRateSchool)
    {
        mallMemberRateSchool.setCreateTime(DateUtils.getNowDate());
        return mallMemberRateSchoolMapper.insertMallMemberRateSchool(mallMemberRateSchool);
    }

    /**
     * 修改用户学校录取率
     * 
     * @param mallMemberRateSchool 用户学校录取率
     * @return 结果
     */
    @Override
    public int updateMallMemberRateSchool(MallMemberRateSchool mallMemberRateSchool)
    {
        mallMemberRateSchool.setUpdateTime(DateUtils.getNowDate());
        return mallMemberRateSchoolMapper.updateMallMemberRateSchool(mallMemberRateSchool);
    }

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

    /**
     * 删除用户学校录取率信息
     * 
     * @param rateSchoolId 用户学校录取率主键
     * @return 结果
     */
    @Override
    public int deleteMallMemberRateSchoolByRateSchoolId(Long rateSchoolId)
    {
        return mallMemberRateSchoolMapper.deleteMallMemberRateSchoolByRateSchoolId(rateSchoolId);
    }
}
