package com.ningdatech.carapi.scheduler.service.impl;

import cn.hutool.core.date.DatePattern;
import com.ningdatech.basic.util.NdDateUtils;
import com.ningdatech.basic.util.StrPool;
import com.ningdatech.carapi.scheduler.model.dto.VehicleStatusDTO;
import com.ningdatech.carapi.scheduler.service.VehicleStatusService;
import com.ningdatech.carapi.scheduler.mapper.VehicleStatusMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @Classname VehicleStatusServiceImpl
 * @Description
 * @Date 2022/11/22 13:46
 * @Created by PoffyZhang
 */
@Service
@RequiredArgsConstructor
@Slf4j
public class VehicleStatusServiceImpl implements VehicleStatusService {

    private final VehicleStatusMapper vehicleStatusMapper;

    @Override
    public List<VehicleStatusDTO> getVehicleStatusInGps(){
        //设置 10分内 的GPS
        int timeScope = 10;
        return vehicleStatusMapper.getVehicleStatusInGps(NdDateUtils.format(LocalDateTime.now(),"yyyy_MM_dd"),timeScope);
    }
}
