package cn.iocoder.yudao.module.jx.service.impl;

import cn.iocoder.yudao.module.jx.domain.DriveSchoolText;
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolTextMapper;
import cn.iocoder.yudao.module.jx.service.IDriveSchoolTextService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 驾校公告Service业务层处理
 *
 * @author jzy
 * @date 2024-04-16
 */
@Service
public class DriveSchoolTextServiceImpl implements IDriveSchoolTextService
{
    @Autowired
    private DriveSchoolTextMapper driveSchoolTextMapper;

    /**
     * 查询驾校公告
     *
     * @param id 驾校公告主键
     * @return 驾校公告
     */
    @Override
    public DriveSchoolText selectDriveSchoolTextById(Long id)
    {
        return driveSchoolTextMapper.selectDriveSchoolTextById(id);
    }

    /**
     * 查询驾校公告列表
     *
     * @param driveSchoolText 驾校公告
     * @return 驾校公告
     */
    @Override
    public IPage<DriveSchoolText> selectDriveSchoolTextList(DriveSchoolText driveSchoolText, Page<DriveSchoolText> page)
    {
        return driveSchoolTextMapper.selectDriveSchoolTextList(driveSchoolText,page);
    }

    /**
     * 新增驾校公告
     *
     * @param driveSchoolText 驾校公告
     * @return 结果
     */
    @Override
    public int insertDriveSchoolText(DriveSchoolText driveSchoolText)
    {
        return driveSchoolTextMapper.insertDriveSchoolText(driveSchoolText);
    }

    /**
     * 修改驾校公告
     *
     * @param driveSchoolText 驾校公告
     * @return 结果
     */
    @Override
    public int updateDriveSchoolText(DriveSchoolText driveSchoolText)
    {

        driveSchoolTextMapper.updateDriveSchoolText(driveSchoolText);
        return driveSchoolTextMapper.updateDriveSchoolText(driveSchoolText);
    }

    /**
     * 批量删除驾校公告
     *
     * @param ids 需要删除的驾校公告主键
     * @return 结果
     */
    @Override
    public int deleteDriveSchoolTextByIds(Long[] ids)
    {
        return driveSchoolTextMapper.deleteDriveSchoolTextByIds(ids);
    }

    /**
     * 删除驾校公告信息
     *
     * @param id 驾校公告主键
     * @return 结果
     */
    @Override
    public int deleteDriveSchoolTextById(Long id)
    {
        return driveSchoolTextMapper.deleteDriveSchoolTextById(id);
    }
}
