mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
新增 车位相机controller
This commit is contained in:
47
jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/camera/CameraController.java
vendored
Normal file
47
jsowell-admin/src/main/java/com/jsowell/web/controller/thirdparty/camera/CameraController.java
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
package com.jsowell.web.controller.thirdparty.camera;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.pile.dto.camera.CameraHeartBeatDTO;
|
||||
import com.jsowell.pile.dto.camera.CameraIdentifyResultsDTO;
|
||||
import com.jsowell.thirdparty.camera.common.CameraCommonResult;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 充电相机 controller
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2023/12/5 9:06:53
|
||||
*/
|
||||
@Anonymous
|
||||
@RestController
|
||||
@RequestMapping("/camera")
|
||||
public class CameraController extends BaseController {
|
||||
|
||||
/**
|
||||
* 心跳
|
||||
* @param dto
|
||||
*/
|
||||
@PostMapping("/v1/receiveHeartBeat")
|
||||
public CameraCommonResult receiveHeartBeat(@RequestBody CameraHeartBeatDTO dto) {
|
||||
logger.info("接收相机系统心跳包 params:{}", JSON.toJSONString(dto));
|
||||
CameraCommonResult result = new CameraCommonResult();
|
||||
logger.info("接收相机系统心跳包 result:{}", JSON.toJSONString(result.successResponse()));
|
||||
return result.successResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* 识别结果
|
||||
* @param jsonObject
|
||||
*/
|
||||
@PostMapping("/v1/receiveIdentifyResults")
|
||||
public void receiveIdentifyResults(@RequestBody JSONObject jsonObject) {
|
||||
logger.info("相机系统接收识别结果 params:{}", jsonObject);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user