package com.hxhq.system.api;

import com.hxhq.common.core.constant.ServiceNameConstants;
import com.hxhq.common.core.web.domain.AjaxResult;
import com.hxhq.system.api.factory.RemoteIntegrationFallbackFactory;
import com.hxhq.system.api.factory.RemoteUserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 对接服务
 * 
 * @author hxhq
 */
@FeignClient(contextId = "remoteIntegrationService", value = ServiceNameConstants.FILE_INTEGRATION, fallbackFactory = RemoteIntegrationFallbackFactory.class)
public interface RemoteIntegrationService
{
    /**
     * AD账号密码鉴权
     * @param username
     * @param password
     * @return
     */
    @PostMapping("/ad/validate")
    AjaxResult validate(@RequestParam("username") String username,
                        @RequestParam("password") String password);

    /**
     * 验证AD账号是否存在
     * @param username
     * @return
     */
    @GetMapping("/ad/exists")
    AjaxResult checkAccountExists(@RequestParam("username") String username);
}
