package org.springblade.third.doordevice.feign;

import org.springblade.community.entity.Residential;
import org.springblade.core.tool.api.R;
import org.springblade.device.dto.UserInfoDto;
import org.springblade.device.entity.DoorDevice;
import org.springblade.third.doordevice.dto.UserDeviceDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

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

/**
 * @author lidexi
 * @date 2021/5/24 14:13
 */
@FeignClient(value = "cyzh-third",path = "/feign/third/doordevice")
public interface IDoorDeviceButtClient {

//	/**
//	 * 远程开门
//	 * @param doorDevice
//	 * @param userInfoDto
//	 */
//	@PostMapping("/remoteOpenDoor")
//	R remoteOpenDoor(@RequestBody DoorDevice doorDevice, @RequestParam Map<String,Object> userInfoDto);
	/**
	 * 新增人脸
	 * @param doorDeviceList
	 * @param userInfoDto
	 */
	@PostMapping("/addUser")
	R addUser(@RequestBody List<DoorDevice> doorDeviceList, @RequestParam Map<String,Object> userInfoDto);

	/**
	 * 新增人脸
	 * @param doorDeviceList
	 * @param userInfoDto
	 */
	@PostMapping("/delUser")
	R delUser(@RequestBody List<DoorDevice> doorDeviceList,@RequestParam Map<String,Object> userInfoDto);

	/**
	 * 新增小区
	 * @param residential
	 */
	@PostMapping("/addResidential")
	R addResidential(@RequestBody Residential residential);

	/**
	 * 新增设备 支持批量下发
	 * @param doorDeviceList
	 */
	@PostMapping("/addDevices")
	R addDevices(@RequestBody List<DoorDevice> doorDeviceList);

	/**
	 * 人脸下发
	 * @param userDeviceDTO
	 */
	@PostMapping("/pushFaceToDevices")
	R pushFaceToDevices(@RequestBody UserDeviceDTO userDeviceDTO);

	/**
	 * 人脸下发
	 * @param userDeviceDTO
	 */
	@PostMapping("/pushFace")
	R pushFace(@RequestBody UserDeviceDTO userDeviceDTO);

	/**
	 * 人脸删除
	 * @param userDeviceDTO
	 */
	@PostMapping("/deleteFaceToDevices")
	R deleteFaceToDevices(@RequestBody UserDeviceDTO userDeviceDTO);

	/**
	 * 人脸删除
	 * @param userDeviceDTO
	 */
	@PostMapping("/deleteFace")
	R deleteFace(@RequestBody UserDeviceDTO userDeviceDTO);

	/**
	 * 远程开门
	 * @param serialNum
	 */
	@PostMapping("/remoteOpenDoor")
	R remoteOpenDoor(@RequestParam String serialNum, @RequestParam String factory, @RequestParam boolean isOpen);
}
