package com.ruoyi.syzy.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.syzy.mapper.BBusiWishUniversitiesRankingMapper;
import com.ruoyi.syzy.domain.BBusiWishUniversitiesRanking;
import com.ruoyi.syzy.service.IBBusiWishUniversitiesRankingService;

/**
 * 院校排名Service业务层处理
 * 
 * @author mingxue
 * @date 2022-06-22
 */
@Service
public class BBusiWishUniversitiesRankingServiceImpl implements IBBusiWishUniversitiesRankingService
{
    @Autowired
    private BBusiWishUniversitiesRankingMapper bBusiWishUniversitiesRankingMapper;

    /**
     * 查询院校排名
     * 
     * @param id 院校排名ID
     * @return 院校排名
     */
    @Override
    public BBusiWishUniversitiesRanking selectBBusiWishUniversitiesRankingById(String id)
    {
        return bBusiWishUniversitiesRankingMapper.selectBBusiWishUniversitiesRankingById(id);
    }

    @Override
    public Integer selectUniversitiesRankingMaxYearByType(String type) {
        return bBusiWishUniversitiesRankingMapper.selectUniversitiesRankingMaxYearByType(type);
    }

    /**
     * 查询院校排名列表
     * 
     * @param bBusiWishUniversitiesRanking 院校排名
     * @return 院校排名
     */
    @Override
    public List<BBusiWishUniversitiesRanking> selectBBusiWishUniversitiesRankingList(BBusiWishUniversitiesRanking bBusiWishUniversitiesRanking)
    {
        return bBusiWishUniversitiesRankingMapper.selectBBusiWishUniversitiesRankingList(bBusiWishUniversitiesRanking);
    }

    @Override
    public List<String> selectBBusiWishUniversitiesRankingTypes() {
        return bBusiWishUniversitiesRankingMapper.selectBBusiWishUniversitiesRankingTypes();
    }

    @Override
    public List<Integer> selectBBusiWishUniversitiesRankingYears(String type) {
        return bBusiWishUniversitiesRankingMapper.selectBBusiWishUniversitiesRankingYears(type);
    }

    /**
     * 新增院校排名
     * 
     * @param bBusiWishUniversitiesRanking 院校排名
     * @return 结果
     */
    @Override
    public int insertBBusiWishUniversitiesRanking(BBusiWishUniversitiesRanking bBusiWishUniversitiesRanking)
    {
        bBusiWishUniversitiesRanking.setCreateTime(DateUtils.getNowDate());
        return bBusiWishUniversitiesRankingMapper.insertBBusiWishUniversitiesRanking(bBusiWishUniversitiesRanking);
    }

    /**
     * 修改院校排名
     * 
     * @param bBusiWishUniversitiesRanking 院校排名
     * @return 结果
     */
    @Override
    public int updateBBusiWishUniversitiesRanking(BBusiWishUniversitiesRanking bBusiWishUniversitiesRanking)
    {
        bBusiWishUniversitiesRanking.setUpdateTime(DateUtils.getNowDate());
        return bBusiWishUniversitiesRankingMapper.updateBBusiWishUniversitiesRanking(bBusiWishUniversitiesRanking);
    }

    /**
     * 批量删除院校排名
     * 
     * @param ids 需要删除的院校排名ID
     * @return 结果
     */
    @Override
    public int deleteBBusiWishUniversitiesRankingByIds(String[] ids)
    {
        return bBusiWishUniversitiesRankingMapper.deleteBBusiWishUniversitiesRankingByIds(ids);
    }

    /**
     * 删除院校排名信息
     * 
     * @param id 院校排名ID
     * @return 结果
     */
    @Override
    public int deleteBBusiWishUniversitiesRankingById(String id)
    {
        return bBusiWishUniversitiesRankingMapper.deleteBBusiWishUniversitiesRankingById(id);
    }
}
