新增 车位相机controller

This commit is contained in:
Lemon
2023-12-05 15:44:59 +08:00
parent 3a0eae4aeb
commit 3e335e692a
5 changed files with 566 additions and 0 deletions

View 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);
}
}