package com.muyu.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.muyu.domain.SysCar;
import com.muyu.domain.SysCarFaultLog;
import com.muyu.domain.req.SysCarReq;

import com.muyu.domain.resp.SysCarFaultLogVo;
import com.muyu.domain.resp.SysCarVo;
import com.muyu.mapper.SysCarMapper;
import com.muyu.service.SysCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysCarServiceImpl extends ServiceImpl<SysCarMapper,SysCar>  implements SysCarService {
    @Autowired
    private SysCarMapper sysCarMapper;
    @Override
    public List<SysCarVo> selectSysCarVoList(SysCarReq sysCarReq) {
        return sysCarMapper.selectSysCarVoList(sysCarReq);
    }

    @Override
    public SysCarVo selectSysCarVoById(Long id) {
        return sysCarMapper.selectSysCarVoById(id);
    }

    @Override
    public int addSysCar(SysCar sysCar) {
        return sysCarMapper.addSysCar(sysCar);
    }

    @Override
    public int deleteSysCarById(Long id) {
        return sysCarMapper.deleteById(id);
    }

    @Override
    public int updateSysCar(SysCar sysCar) {
        return sysCarMapper.updSysCarById(sysCar);
    }

    @Override
    public List<SysCarFaultLogVo> findFenceByCarVin(String carVin) {
        return sysCarMapper.findFenceByCarVin(carVin);
    }
}
