puzhibing
2026-05-12 08cc6d5cf7e93b75cfabe7dcc2aeaa9afa1117eb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.xiaopeng.api.feignClient.account;
 
import com.xiaopeng.api.dto.account.UcUserInfo;
import com.xiaopeng.api.factory.account.UserResourcesClientFallbackFactory;
import com.xiaopeng.common.core.dto.ServiceNameConstantsEnum;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
 
import java.util.List;
import java.util.Map;
 
/**
 * 小鹏用户中心---用户信息
 */
@FeignClient(contextId = "UserResourcesClient",
        value = ServiceNameConstantsEnum.XP_USER_RESOURCES_SERVICE,
        fallbackFactory = UserResourcesClientFallbackFactory.class)
public interface UserResourcesClient {
 
    /**
     * 根据 uid 列表批量查询用户信息(有大小限制)。有大小限制最大200个
     * 返回示例为一个 Map,key 为 uid 字符串,value 为用户信息对象。
     *
     * @param uids           uid 列表
     * @param getPreCarOwner 是否获取前车主信息(可选)
     * @return Map,key 为 uid 字符串,value 为用户信息对象
     */
    @GetMapping("/logan/userResources/getUserListByUids")
    Map<String, UcUserInfo> getUserListByUids(@RequestParam("uids") List<Long> uids,
                                              @RequestParam(value = "getPreCarOwner", required = false) Boolean getPreCarOwner);
 
 
    /**
     * 根据uid获取用户基本信息,不包括预订状态和主使用人身份
     */
    @GetMapping("/logan/userResources/getBaseUserByUid")
    UcUserInfo getBaseUserByUid(@RequestParam("uid") String uid);
 
 
    /**
     * 根据手机号获取用户信息
     */
    @GetMapping("/logan/userResources/getUserByMobile")
    UcUserInfo getUserByMobile(@RequestParam("mobile") String mobile);
}