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

import cn.iocoder.yudao.module.jx.domain.DriveSchoolCourseOrder;
import cn.iocoder.yudao.module.jx.mapper.DriveSchoolCourseOrderMapper;
import cn.iocoder.yudao.module.jx.service.IDriveSchoolCourseOrderService;
import cn.iocoder.yudao.module.jx.utils.DateUtils;
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 ruoyi
 * @date 2024-03-25
 */
@Service
public class DriveSchoolCourseOrderServiceImpl implements IDriveSchoolCourseOrderService
{
    @Autowired
    private DriveSchoolCourseOrderMapper driveSchoolCourseOrderMapper;

    /**
     * 查询驾照报名订单
     *
     * @param id 驾照报名订单主键
     * @return 驾照报名订单
     */
    @Override
    public DriveSchoolCourseOrder selectDriveSchoolCourseOrderById(Long id)
    {
        return driveSchoolCourseOrderMapper.selectDriveSchoolCourseOrderById(id);
    }

    /**
     * 查询驾照报名订单列表
     *
     * @param driveSchoolCourseOrder 驾照报名订单
     * @return 驾照报名订单
     */
    @Override
    public IPage<DriveSchoolCourseOrder> selectDriveSchoolCourseOrderList(DriveSchoolCourseOrder driveSchoolCourseOrder, Page<DriveSchoolCourseOrder> page)
    {
        return driveSchoolCourseOrderMapper.selectDriveSchoolCourseOrderList(driveSchoolCourseOrder,page);
    }

    /**
     * 新增驾照报名订单
     *
     * @param driveSchoolCourseOrder 驾照报名订单
     * @return 结果
     */
    @Override
    public int insertDriveSchoolCourseOrder(DriveSchoolCourseOrder driveSchoolCourseOrder)
    {
        return driveSchoolCourseOrderMapper.insertDriveSchoolCourseOrder(driveSchoolCourseOrder);
    }

    /**
     * 修改驾照报名订单
     *
     * @param driveSchoolCourseOrder 驾照报名订单
     * @return 结果
     */
    @Override
    public int updateDriveSchoolCourseOrder(DriveSchoolCourseOrder driveSchoolCourseOrder)
    {
        //driveSchoolCourseOrder.setUpdateTime(DateUtils.getNowDate());
        return driveSchoolCourseOrderMapper.updateDriveSchoolCourseOrder(driveSchoolCourseOrder);
    }

    /**
     * 批量删除驾照报名订单
     *
     * @param ids 需要删除的驾照报名订单主键
     * @return 结果
     */
    @Override
    public int deleteDriveSchoolCourseOrderByIds(Long[] ids)
    {
        return driveSchoolCourseOrderMapper.deleteDriveSchoolCourseOrderByIds(ids);
    }

    /**
     * 删除驾照报名订单信息
     *
     * @param id 驾照报名订单主键
     * @return 结果
     */
    @Override
    public int deleteDriveSchoolCourseOrderById(Long id)
    {
        return driveSchoolCourseOrderMapper.deleteDriveSchoolCourseOrderById(id);
    }
}
