puzhibing
2026-04-01 4dbdb4bc373f0cb20c7aa374d8cbcadfa7c56c97
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.xiaopeng.api.feignClient.vehicleConvoy;
 
import com.xiaopeng.api.factory.vehicleConvoy.XpFleetOperationsClientFallbackFactory;
import com.xiaopeng.api.factory.vehicleConvoy.XpFleetVehicleClientFallbackFactory;
import com.xiaopeng.api.model.vehicleConvoy.XpFleetOperations;
import com.xiaopeng.common.core.domain.R;
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.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
 
import java.util.List;
 
/**
 * 车队人员Feign客户端
 *
 * @author mitao
 */
@FeignClient(contextId = "XpFleetVehicleClient",
        value = ServiceNameConstantsEnum.XP_VEHICLE_CONVOY_SERVICE,
        fallbackFactory = XpFleetOperationsClientFallbackFactory.class)
public interface XpFleetOperationsClient {
 
    /**
     * 根据人员id 获取所属车队下关联的车辆ids
     *
     * @param id 运维人员id
     * @return 车辆isd
     */
    @GetMapping("/inner/fleet-operations/getVehicleByUserId/{id}")
    R<List<Long>> getVehicleByUserId(@PathVariable("id") Long id);
 
    /**
     * 根据运维人员ID查询关联的车队ID列表
     *
     * @param userId 运维人员ID
     * @return 车队ID列表
     */
    @GetMapping("/inner/fleet-operations/getFleetIdsByUserId/{userId}")
    R<List<Long>> getFleetIdsByUserId(@PathVariable("userId") Long userId);
 
 
    /**
     * 根据车队ID查询关联的运维人员ID列表
     *
     * @param fleetId 车队ID
     * @return 运维人员ID列表
     */
    @GetMapping("/inner/fleet-operations/getOperationsIdsByFleetId/{fleetId}")
    R<List<Long>> getOperationsIdsByFleetId(@PathVariable("fleetId") Long fleetId);
    /**
     * 根据车队ID集合查询关联的运维人员ID列表
     *
     * @param fleetIds 车队ID集合
     * @return 运维人员ID列表
     */
    @PostMapping("/inner/fleet-operations/getOperationsIdsByFleetIds")
    R<List<XpFleetOperations>> getOperationsIdsByFleetIds(@RequestBody List<Long> fleetIds);
}