package com.ruoyi.mall.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mall.mapper.MallSchoolBatchLinkMapper;
import com.ruoyi.mall.domain.MallSchoolBatchLink;
import com.ruoyi.mall.service.IMallSchoolBatchLinkService;

/**
 * 学校批次关联Service业务层处理
 *
 * @author Lsm
 * @date 2023-10-19
 */
@Service
public class MallSchoolBatchLinkServiceImpl implements IMallSchoolBatchLinkService
{
    @Autowired
    private MallSchoolBatchLinkMapper mallSchoolBatchLinkMapper;

    /**
     * 查询学校批次关联
     *
     * @param schoolBatchId 学校批次关联主键
     * @return 学校批次关联
     */
    @Override
    public MallSchoolBatchLink selectMallSchoolBatchLinkBySchoolBatchId(Long schoolBatchId)
    {
        return mallSchoolBatchLinkMapper.selectMallSchoolBatchLinkBySchoolBatchId(schoolBatchId);
    }

    /**
     * 查询学校批次关联列表
     *
     * @param mallSchoolBatchLink 学校批次关联
     * @return 学校批次关联
     */
    @Override
    public List<MallSchoolBatchLink> selectMallSchoolBatchLinkList(MallSchoolBatchLink mallSchoolBatchLink)
    {
        return mallSchoolBatchLinkMapper.selectMallSchoolBatchLinkList(mallSchoolBatchLink);
    }

    /**
     * 新增学校批次关联
     *
     * @param mallSchoolBatchLink 学校批次关联
     * @return 结果
     */
    @Override
    public int insertMallSchoolBatchLink(MallSchoolBatchLink mallSchoolBatchLink)
    {
        return mallSchoolBatchLinkMapper.insertMallSchoolBatchLink(mallSchoolBatchLink);
    }

    /**
     * 修改学校批次关联
     *
     * @param mallSchoolBatchLink 学校批次关联
     * @return 结果
     */
    @Override
    public int updateMallSchoolBatchLink(MallSchoolBatchLink mallSchoolBatchLink)
    {
        return mallSchoolBatchLinkMapper.updateMallSchoolBatchLink(mallSchoolBatchLink);
    }

    /**
     * 批量删除学校批次关联
     *
     * @param schoolBatchIds 需要删除的学校批次关联主键
     * @return 结果
     */
    @Override
    public int deleteMallSchoolBatchLinkBySchoolBatchIds(Long[] schoolBatchIds)
    {
        return mallSchoolBatchLinkMapper.deleteMallSchoolBatchLinkBySchoolBatchIds(schoolBatchIds);
    }

    /**
     * 删除学校批次关联信息
     *
     * @param schoolBatchId 学校批次关联主键
     * @return 结果
     */
    @Override
    public int deleteMallSchoolBatchLinkBySchoolBatchId(Long schoolBatchId)
    {
        return mallSchoolBatchLinkMapper.deleteMallSchoolBatchLinkBySchoolBatchId(schoolBatchId);
    }


    @Override
    public List<MallSchoolBatchLink> selectMallSchoolBatchLinkRepetitionList() {
        return mallSchoolBatchLinkMapper.selectMallSchoolBatchLinkRepetitionList();
    }
}
