package com.sqx.modules.car.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sqx.common.utils.Result;
import com.sqx.modules.car.dao.CarDao;
import com.sqx.modules.car.entity.Car;
import com.sqx.modules.car.service.CarService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class CarServiceImpl extends ServiceImpl<CarDao, Car> implements CarService {


    @Override
    public Result insert(Car car) {
        baseMapper.insert(car);
        return Result.success();
    }

    @Override
    public Result updateCar(Car car) {
        baseMapper.updateById(car);
        return Result.success();
    }

    @Override
    public Result deleteCar(Long carId) {
        baseMapper.deleteById(carId);
        return Result.success();
    }
}
