package com.mortals.xhx.busiz.web;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.common.Rest;
import com.mortals.xhx.busiz.req.event.EventRecognBlackInfo;
import com.mortals.xhx.common.code.ApiRespCodeEnum;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
@RequestMapping("hik")
public class HikCallbackController {
    @PostMapping("eventRcv")
    @UnAuth
    public Rest<String> refreshMessage(@RequestBody EventRecognBlackInfo req) {
        log.info("【接收事件数据】【请求体】-->  " + JSONObject.toJSONString(req));
        try {
            //todo
        } catch (Exception e) {
            log.error("接收数据失败", e);
            return Rest.fail();
        }
        return Rest.ok();
    }


}
