RemoteUserService.java
1009 Bytes
package com.huaheng.system.api;
import com.huaheng.common.core.constant.ServiceNameConstants;
import com.huaheng.common.core.domain.R;
import com.huaheng.system.api.factory.RemoteUserFallbackFactory;
import com.huaheng.system.api.model.LoginUser;
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.RequestParam;
/**
* 用户服务
*/
@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteUserService
{
/**
* 通过用户名查询用户信息
*
* @param username 用户名
* @return 结果
*/
@GetMapping(value = "/user/info/{username}/{warehouseCode}")
public R<LoginUser> getUserInfo(@PathVariable("username") String username, @PathVariable("warehouseCode") String warehouseCode);
}