package com.ruoyi.syzy.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.syzy.mapper.BBusiWishScoreGroupsMapper;
import com.ruoyi.syzy.domain.BBusiWishScoreGroups;
import com.ruoyi.syzy.service.IBBusiWishScoreGroupsService;

/**
 * 一分一段Service业务层处理
 *
 * @author mingxue
 * @date 2021-08-19
 */
@Service
public class BBusiWishScoreGroupsServiceImpl implements IBBusiWishScoreGroupsService {
    @Autowired
    private BBusiWishScoreGroupsMapper bBusiWishScoreGroupsMapper;

    @Override
    public List<BBusiWishScoreGroups> selectBusiWishScoreGroupsByScore(Map cond) {
        return bBusiWishScoreGroupsMapper.selectBusiWishScoreGroupsByScore(cond);
    }

    @Override
    public List<String> locations() {
        return bBusiWishScoreGroupsMapper.locations();
    }

    @Override
    public List<Integer> years(String location) {
        return bBusiWishScoreGroupsMapper.years(location);
    }

    @Override
    public List<Integer> yearsNoStatus(String location) {
        return bBusiWishScoreGroupsMapper.yearsNoStatus(location);
    }

    @Override
    public Integer selectBBusiWishScoreGroupsByLocation(String location, String mode) {
        return bBusiWishScoreGroupsMapper.selectBBusiWishScoreGroupsByLocation(location, mode);
    }

    @Override
    public List<String> modes(String location, String year) {
        return bBusiWishScoreGroupsMapper.modes(location, year);
    }

    @Override
    public List<BBusiWishScoreGroups> modesNoStatus(String location, String year) {
        return bBusiWishScoreGroupsMapper.modesNoStatus(location, year);
    }

    /**
     * 查询一分一段
     *
     * @param id 一分一段ID
     * @return 一分一段
     */
    @Override
    public BBusiWishScoreGroups selectBBusiWishScoreGroupsById(Long id) {
        return bBusiWishScoreGroupsMapper.selectBBusiWishScoreGroupsById(id);
    }

    /**
     * 查询一分一段列表
     *
     * @param bBusiWishScoreGroups 一分一段
     * @return 一分一段
     */
    @Override
    public List<BBusiWishScoreGroups> selectBBusiWishScoreGroupsList(BBusiWishScoreGroups bBusiWishScoreGroups) {
        return bBusiWishScoreGroupsMapper.selectBBusiWishScoreGroupsList(bBusiWishScoreGroups);
    }

    /**
     * 新增一分一段
     *
     * @param bBusiWishScoreGroups 一分一段
     * @return 结果
     */
    @Override
    public int insertBBusiWishScoreGroups(BBusiWishScoreGroups bBusiWishScoreGroups) {
        bBusiWishScoreGroups.setCreateTime(DateUtils.getNowDate());
        return bBusiWishScoreGroupsMapper.insertBBusiWishScoreGroups(bBusiWishScoreGroups);
    }

    /**
     * 修改一分一段
     *
     * @param bBusiWishScoreGroups 一分一段
     * @return 结果
     */
    @Override
    public int updateBBusiWishScoreGroups(BBusiWishScoreGroups bBusiWishScoreGroups) {
        return bBusiWishScoreGroupsMapper.updateBBusiWishScoreGroups(bBusiWishScoreGroups);
    }

    /**
     * 批量删除一分一段
     *
     * @param ids 需要删除的一分一段ID
     * @return 结果
     */
    @Override
    public int deleteBBusiWishScoreGroupsByIds(Long[] ids) {
        return bBusiWishScoreGroupsMapper.deleteBBusiWishScoreGroupsByIds(ids);
    }

    /**
     * 删除一分一段信息
     *
     * @param id 一分一段ID
     * @return 结果
     */
    @Override
    public int deleteBBusiWishScoreGroupsById(Long id) {
        return bBusiWishScoreGroupsMapper.deleteBBusiWishScoreGroupsById(id);
    }
}
