package com.sptg.gateway.controller.camera;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zwx
 * @create 2020/12/16 0:34
 */
@Slf4j
@RestController
@RequiredArgsConstructor
public class CameraController {

    /**
     * 功能描述: 红外热成像人脸、测温推送
     * @param map 请求参数
     * @return ResultBean<Boolean>
     *
     *
     */
    @PostMapping(value = "/infrared/data/notice")
    public Map<String, Object> infraredDataNotice(@RequestBody Map<String, String> map){
        String method = map.get("method");
        if(method.equals("infrared_aiom_picture")){
            String pic = map.get("picture");
            String picRed = map.get("picture_red");
            log.warn("------------------pic  " + pic + "  pic----------------------");
            log.warn("------------------pic_red  " + picRed + "  pic_red----------------------");
        }
        Map<String, Object> result = new HashMap<>();
        result.put("status", 1);
        return result;
    }
}
