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

import com.yuchen.saas.device.api.dto.irrigate.SaasHandleAutoIrrigationDTO;
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.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(
        value = AppNameConstant.SAAS_DEVICE,
        fallbackFactory = IrrigateFeignFallback.class
)
public interface IrrigateFeign {

    /**
     * 自动浇灌
     * @param handleAutoIrrigationDTO 自动浇灌DTO
     * @return
     */
    @PostMapping("/irrigation/handleAutoIrrigation")
    R<Boolean> handleAutoIrrigation(@RequestBody SaasHandleAutoIrrigationDTO handleAutoIrrigationDTO);

}
