riku
2021-01-13 4db9806cc644bd58124aa9d8f1dbf9aee60d408f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.flightfeather.uav.lightshare.web
 
import com.flightfeather.uav.lightshare.service.RealTimeDataService
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController
 
@RestController
@RequestMapping("air/realtime")
class RealTimeDataController(val realTimeDataService: RealTimeDataService) {
 
    @GetMapping("/sec")
    fun getSecondData(
            @RequestParam(value = "deviceCode", required = false) deviceCode: String?,
            @RequestParam(value = "page", required = false) page: Int?,
            @RequestParam(value = "perPage", required = false) perPage: Int?
    ) = realTimeDataService.getSecondData(deviceCode,page, perPage)
}