package com.mortals.xhx.common.utils;

import com.mortals.framework.common.Rest;
import com.mortals.framework.util.HttpUtil;
import com.mortals.xhx.module.hik.event.model.req.callback.EventReq;
import com.mortals.xhx.module.hik.event.service.IHikEventService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

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

import static com.mortals.framework.util.HttpUtil.HEADER_CONTENT_TYPE;

/**
 * 发通知第三方
 *
 * @author: zxfei
 * @date: 2022/4/28 10:56
 * @description:
 **/
@Slf4j
@AllArgsConstructor
public class ComsumerSnapTask implements Runnable {
    private IHikEventService hikEventService;

    private EventReq req;

    @Override
    public void run() {
        try {
            Rest<String> rest =  hikEventService.handleEvent(req);
        } catch (Exception e) {
            log.error("异常:", e);
        }
    }
}
