package com.casic.controller; import com.casic.model.*; import com.casic.service.DeviceService; 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; @RestController @RequestMapping("/device") public class DeviceController { private final DeviceService deviceService; public DeviceController(DeviceService deviceService) { this.deviceService = deviceService; } @RequestMapping("/helloWord") public ResponseData helloWord() { return deviceService.testMysql(); } @PostMapping("/online") public ResponseData DeviceOnline(@RequestBody DeviceOnlineParam onlineParam) { return deviceService.onlineStatusByImei(onlineParam.getEventType(),onlineParam.getImei()); } }