package com.muyu.enterprise.remote;

import com.muyu.common.core.constant.SecurityConstants;
import com.muyu.common.core.constant.ServiceNameConstants;
import com.muyu.common.core.domain.Result;
import com.muyu.common.system.domain.SysUser;
import com.muyu.enterprise.remote.factory.RemoteFirmUserFallbackFactory;
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.RequestHeader;

/**
 * @Author：杨鹏
 * @Package：com.muyu.enterpries.remote
 * @Project：cloud-vehicle
 * @name：RemoteFirmUserService
 * @Date：2024/10/8 19:58
 */
@FeignClient(contextId = "remoteFirmUserService",
        value = ServiceNameConstants.ENTERPRISE_SERVICE,
        fallbackFactory = RemoteFirmUserFallbackFactory.class)
public interface RemoteFirmUserService {

    @GetMapping("/firm/query_by_username/{username}")
    Result<SysUser> queryByUsername(@PathVariable("username") String username,@RequestHeader(SecurityConstants.INNER) String source,@RequestHeader("ent_code") String databaseName);

}
