SpeedingController.java 1.15 KB
package cn.com.glsx.stdinterface.modules.controller;

import cn.com.glsx.stdinterface.api.DeviceSpeedingClient;
import cn.com.glsx.stdinterface.dto.DeviceSpeedingDTO;
import cn.com.glsx.stdinterface.modules.service.SpeedingService;
import com.glsx.plat.core.web.R;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
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;

/**
 * 超速报警
 * @author xiangyanlin
 * @date 2022/5/6
 */
@Slf4j
@RestController
@RequestMapping(value = "/speeding")
@Api(value = "超速报警", tags = {"超速报警"})
public class SpeedingController implements DeviceSpeedingClient {

    @Autowired
    private SpeedingService speedingService;

    @PostMapping(value = "/save")
    @Override
    public R saveDeviceSpeeding(@RequestBody DeviceSpeedingDTO deviceSpeedingDTO) {
        speedingService.saveDeviceSpeeding(deviceSpeedingDTO);
        return R.ok();
    }
}