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

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.iocoder.yudao.util.DateUtils;
import org.springframework.stereotype.Service;
import cn.iocoder.yudao.module.inspection.mapper.InspectionPickCarMapper;
import cn.iocoder.yudao.module.inspection.entity.InspectionPickCar;
import cn.iocoder.yudao.module.inspection.service.IInspectionPickCarService;

/**
 * 上门取车服务Service业务层处理
 *
 * @author 朱春云
 * @date 2023-09-02
 */
@Service
public class InspectionPickCarServiceImpl extends ServiceImpl<InspectionPickCarMapper,InspectionPickCar> implements IInspectionPickCarService
{

    /**
     * 查询上门取车服务
     *
     * @param id 上门取车服务主键
     * @return 上门取车服务
     */
    @Override
    public InspectionPickCar selectInspectionPickCarById(Long id)
    {
        return baseMapper.selectInspectionPickCarById(id);
    }

    /**
     * 查询上门取车服务列表
     *
     * @param inspectionPickCar 上门取车服务
     * @return 上门取车服务
     */
    @Override
    public IPage<InspectionPickCar> selectInspectionPickCarList(Page<InspectionPickCar> page, InspectionPickCar inspectionPickCar)
    {
        return baseMapper.selectInspectionPickCarList(page,inspectionPickCar);
    }

    /**
     * 新增上门取车服务
     *
     * @param inspectionPickCar 上门取车服务
     * @return 结果
     */
    @Override
    public int insertInspectionPickCar(InspectionPickCar inspectionPickCar)
    {
        return baseMapper.insertInspectionPickCar(inspectionPickCar);
    }

    /**
     * 修改上门取车服务
     *
     * @param inspectionPickCar 上门取车服务
     * @return 结果
     */
    @Override
    public int updateInspectionPickCar(InspectionPickCar inspectionPickCar)
    {
        inspectionPickCar.setUpdateTime(DateUtils.getNowDate());
        return baseMapper.updateInspectionPickCar(inspectionPickCar);
    }

    /**
     * 批量删除上门取车服务
     *
     * @param ids 需要删除的上门取车服务主键
     * @return 结果
     */
    @Override
    public int deleteInspectionPickCarByIds(Long[] ids)
    {
        return baseMapper.deleteInspectionPickCarByIds(ids);
    }

    /**
     * 删除上门取车服务信息
     *
     * @param id 上门取车服务主键
     * @return 结果
     */
    @Override
    public int deleteInspectionPickCarById(Long id)
    {
        return baseMapper.deleteInspectionPickCarById(id);
    }
}
