package com.ningdatech.carapi.gps.controller;

import com.ningdatech.carapi.gps.manage.GpsDataPullManage;
import com.ningdatech.carapi.gps.model.GpsDataVO;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author PoffyZhang
 * @since 2022-10-09
 */
@Slf4j
@Validated
@RestController
@RequestMapping("/gps")
@RequiredArgsConstructor
public class GpsDataPullController {

    private final GpsDataPullManage gpsDataPullManage;

    @ApiOperation(value = "GPS数据拉取测试", notes = "GPS数据拉取测试")
    @GetMapping("/get-gps-data")
    public String getGpsData() {
        return gpsDataPullManage.getGpsData();
    }

    @ApiOperation(value = "GPS数据增量拉取测试", notes = "GPS数据增量拉取测试")
    @GetMapping("/get-add-gps-data")
    public String getAddGpsData() {
        return gpsDataPullManage.getAddGpsData();
    }

    @ApiOperation(value = "GPS数据增量拉取缓存ID设置", notes = "GPS数据增量拉取缓存ID设置")
    @GetMapping("/update-redis-id")
    public String updateRedisId() {
        return gpsDataPullManage.updateRedisId();
    }

    @ApiOperation(value = "数据驾驶舱算法分析数据获取", notes = "数据驾驶舱算法分析数据获取")
    @GetMapping("/get-redis-data")
    public String getRedisData() {
        return gpsDataPullManage.getRedisData();
    }
}
