package com.zd.system.api.forward;

import com.zd.common.core.constant.ServiceNameConstants;
import com.zd.common.core.domain.R;
import com.zd.system.api.domain.SysFile;
import com.zd.system.api.forward.factory.RemoteForwardFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 消息内容feign调用服务
 */
@FeignClient(contextId = "remoteForwardService", value = ServiceNameConstants.FORWARD_SERVICE, fallbackFactory = RemoteForwardFallbackFactory.class)
public interface RemoteForwardService {


    /**
     * 保存检查记录
     */
    @PostMapping("/checklog")
    R add(@RequestBody Map<String,Object> map);


    @PostMapping("/algorithm/save")
    Object saveData(@RequestBody Map<String, Object> data);

    @GetMapping("/alarm/photograph")
    R<SysFile> photograph(@RequestParam("streamUrl") String streamUrl);
}
