package com.ruoyi.mall.service.impl;

import com.ruoyi.mall.domain.MallSchoolIntroduce;
import com.ruoyi.mall.mapper.MallSchoolIntroduceMapper;
import com.ruoyi.mall.service.IMallSchoolIntroduceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 学校介绍关联Service业务层处理
 *
 * @author lsm
 * @date 2023-10-18
 */
@Service
public class MallSchoolIntroduceServiceImpl implements IMallSchoolIntroduceService
{
    @Autowired
    private MallSchoolIntroduceMapper mallSchoolIntroduceMapper;

    /**
     * 查询学校介绍关联
     *
     * @param schoolIntroduceId 学校介绍关联主键
     * @return 学校介绍关联
     */
    @Override
    public MallSchoolIntroduce selectMallSchoolIntroduceBySchoolIntroduceId(Long schoolIntroduceId)
    {
        return mallSchoolIntroduceMapper.selectMallSchoolIntroduceBySchoolIntroduceId(schoolIntroduceId);
    }

    /**
     * 查询学校介绍关联列表
     *
     * @param mallSchoolIntroduce 学校介绍关联
     * @return 学校介绍关联
     */
    @Override
    public List<MallSchoolIntroduce> selectMallSchoolIntroduceList(MallSchoolIntroduce mallSchoolIntroduce)
    {
        return mallSchoolIntroduceMapper.selectMallSchoolIntroduceList(mallSchoolIntroduce);
    }

    /**
     * 新增学校介绍关联
     *
     * @param mallSchoolIntroduce 学校介绍关联
     * @return 结果
     */
    @Override
    public int insertMallSchoolIntroduce(MallSchoolIntroduce mallSchoolIntroduce)
    {
        return mallSchoolIntroduceMapper.insertMallSchoolIntroduce(mallSchoolIntroduce);
    }

    /**
     * 修改学校介绍关联
     *
     * @param mallSchoolIntroduce 学校介绍关联
     * @return 结果
     */
    @Override
    public int updateMallSchoolIntroduce(MallSchoolIntroduce mallSchoolIntroduce)
    {
        return mallSchoolIntroduceMapper.updateMallSchoolIntroduce(mallSchoolIntroduce);
    }

    /**
     * 批量删除学校介绍关联
     *
     * @param schoolIntroduceIds 需要删除的学校介绍关联主键
     * @return 结果
     */
    @Override
    public int deleteMallSchoolIntroduceBySchoolIntroduceIds(Long[] schoolIntroduceIds)
    {
        return mallSchoolIntroduceMapper.deleteMallSchoolIntroduceBySchoolIntroduceIds(schoolIntroduceIds);
    }

    /**
     * 删除学校介绍关联信息
     *
     * @param schoolIntroduceId 学校介绍关联主键
     * @return 结果
     */
    @Override
    public int deleteMallSchoolIntroduceBySchoolIntroduceId(Long schoolIntroduceId)
    {
        return mallSchoolIntroduceMapper.deleteMallSchoolIntroduceBySchoolIntroduceId(schoolIntroduceId);
    }
}
