package com.persagy.dmp.auth.client;

import com.persagy.dmp.auth.config.AuthFeignConfig;
import com.persagy.dmp.common.model.response.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * paas-account服务
 * @author : lijie
 * Update By 2022/1/10 18:18
 */
@FeignClient(name = "paas-account",fallbackFactory = PaasAccountFallbackFactory.class,
        url = "${paas.account.service:}",path = "/paas",configuration = AuthFeignConfig.class)
public interface PaasAccountClient {

    /**
     * PAAS平台的登录接口
     * @param param : 请求参数
     * @return : com.persagy.dmp.common.model.response.CommonResult<java.lang.String>
     * @author : lijie
     * Update By 2022/1/10 18:20
     */
    @PostMapping(value = "/account/login")
    CommonResult<String> accountLogin(@RequestBody Object param);
    /**
     * PAAS平台的刷新token接口
     * @param param : 请求参数
     * @return : com.persagy.dmp.common.model.response.CommonResult<java.lang.String>
     * @author : lijie
     * Update By 2022/1/10 18:20
     */
    @PostMapping(value = "/account/token/refresh")
    CommonResult<String> accountTokenRefresh(@RequestBody Object param);


}
