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

import com.yuchen.saas.device.api.dto.NetOperateDeviceQueryDto;
import com.yuchen.saas.device.api.dto.operatingEnd.NetDevicePageQryDTO;
import com.yuchen.saas.device.api.vo.NetOperateDeviceListVO;
import com.yuchen.saas.device.api.vo.operatingEnd.NetOperateDevicePageVO;
import io.swagger.annotations.ApiOperation;
import org.nest.springwrap.core.launch.app.AppNameConstant;
import org.nest.springwrap.core.mp.support.NestPage;
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.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author yuanzhelin
 * @Date 2024/7/30 17:21
 * @Description TODO
 */
@FeignClient(
        value = AppNameConstant.SAAS_DEVICE,
        fallbackFactory = NetOperateDeviceFeignServiceFallback.class
)
public interface NetOperateDeviceFeignService {
    @PostMapping("/netOperateDevice/getData/{deviceId}")
    R<NetOperateDevicePageVO> getData(@PathVariable("deviceId") Long deviceId);
    @GetMapping("/netOperateDevice/getNoBoundList/{deviceIds}")
    R<NestPage<NetOperateDeviceListVO>> getNoBoundList(@PathVariable("deviceIds") String deviceIds);

    @PostMapping("/netOperateDevice/getByKeyAndName")
    R<NetOperateDeviceListVO> getOne(@RequestBody NetOperateDeviceQueryDto dto);

    @PostMapping("/netOperateDevice/page")
    @ApiOperation(value = "列表")
    R<NestPage<NetOperateDevicePageVO>> page(@RequestBody NetDevicePageQryDTO qryDto);
}
