package org.springblade.device.feign;

import io.swagger.annotations.ApiParam;
import org.springblade.device.entity.IotAlarm;
import org.springblade.device.vo.IotAlarmVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
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 javax.validation.Valid;
import java.util.List;

/**
 * 设备告警 Feign
 *
 * @author lianghanqiang
 * @since 2021-04-19
 */
@FeignClient(value = "cyzh-smart-device",path = "/feign/iotalarm")
public interface IIotAlarmClient  {

	/**
	 * 详情
	 */
	@GetMapping("/detail")
    IotAlarmVO detail(@SpringQueryMap IotAlarm iotAlarm);

	/**
	 * 查询 设备告警
	 */
	@GetMapping("/list")
    List<IotAlarmVO> list(@SpringQueryMap IotAlarm iotAlarm);



	/**
	 * 新增 设备告警
	 */
	@PostMapping("/save")
	boolean save(@Valid @RequestBody IotAlarm iotAlarm);

	/**
	 * 修改 设备告警
	 */
	@PostMapping("/update")
    boolean update(@Valid @RequestBody IotAlarm iotAlarm);

	/**
	 * 新增或修改 设备告警
	 */
	@PostMapping("/submit")
    boolean submit(@Valid @RequestBody IotAlarm iotAlarm);


	/**
	 * 删除 设备告警
	 */
	@PostMapping("/remove")
    boolean remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids);


}
