package cn.iocoder.yudao.module.system.api.remote;

import cn.iocoder.yudao.module.system.api.remote.dto.LoginCheckDTO;
import cn.iocoder.yudao.module.system.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "RPC 服务 - 远遥登录相关的服务调用")
public interface RemoteLoginApi {
    String PREFIX = ApiConstants.PREFIX + "/remote";

    @PostMapping(PREFIX + "/saveIpAndPort")
    @Operation(summary = "保存IP和端口")
    void saveIpAndPort(@RequestBody LoginCheckDTO loginCheckDTO);

    @PostMapping(PREFIX + "/getIpAndPort")
    @Operation(summary = "查询默认IP和端口")
    LoginCheckDTO getIpAndPort(@RequestParam("ip") String ip);
}
