package com.yuchen.saas.integration.feign.api.feign;

import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.tool.api.R;
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.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author 刘通
 * @date 2021/1/3 17:10
 */
@FeignClient(
		value = AppNameConstant.SAAS_DEVICE_INTEGRATED,
		fallback = CameraClientFallback.class
)
public interface CameraClient {
	
	@PostMapping("/camera/getPreviewUrl")
	R<List<Map<String, Object>>> getPreviewUrl();
	
	@PostMapping("/face/addFace")
	R<Map<String, Object>> addFace(Map<String, Object> body);
	
	@PostMapping("/face/getFaceGroup")
	R<List<Map<String, Object>>> getFaceGroup(Map<String, Object> body);

	@GetMapping("/hikCamera/getCountOnlineCamera")
	Map<String, Object> getCountOnlineCamera(@RequestParam String parkId);

	@GetMapping("/hikCamera/getPreviewUrlByCode")
	Map<String, Object> getPreviewUrlByCode(@RequestParam String cameraIndexCode,@RequestParam String streamType);
}
