package com.prolog.rdc.tms.controller;

import com.prolog.framework.common.message.RestMessage;
import com.prolog.framework.log.aop.annotation.UserLog;
import com.prolog.rdc.tms.model.vo.PullGpsDataVO;
import com.prolog.rdc.tms.service.GpsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author hongbo.pan
 * @date 2022/9/20
 */
@RestController
@Api(tags = "在途管理-运单定位/轨迹")
@RequestMapping("/gps")
public class GpsController {

    @Autowired
    private GpsService service;

    @UserLog("拉取数据")
    @ApiOperation(value = "拉取数据", notes = "拉取数据")
    @PostMapping("/pullGpsData")
    public RestMessage<Object> pullGpsData(@RequestBody @Valid PullGpsDataVO vo) {
        service.pullGpsData(vo);
        return RestMessage.newInstance(true, "成功！", null);
    }

}
