CustomerApiService.java
4.49 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
package cn.fw.valhalla.sdk.api;
import cn.fw.data.base.domain.common.Message;
import cn.fw.valhalla.sdk.param.ChangeAdviserReq;
import cn.fw.valhalla.sdk.param.ChangePlateNoReq;
import cn.fw.valhalla.sdk.param.CustomerParams;
import cn.fw.valhalla.sdk.result.CustomerContactDto;
import cn.fw.valhalla.sdk.result.CustomerInfoDto;
import cn.fw.valhalla.sdk.result.ReceptionResultDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import javax.validation.Valid;
import java.util.List;
/**
* 客户、车相关api
* <p>
* create at 2019-09-05
*
* @author xiatian
*/
@FeignClient(value = "fw-valhalla", path = "/api/valhalla/customer")
public interface CustomerApiService {
/**
* 新增售后保有客档案
*
* @param customerParams
* @return
*/
@PostMapping("/save")
Message<Boolean> addCustomer(@Valid @RequestBody CustomerParams customerParams);
/**
* 查询保有客档案信息
*
* @param customerId
* @return
*/
@GetMapping("/query/by/id")
Message<CustomerInfoDto> queryById(@RequestParam("customerId") Long customerId);
/**
* 通过手机号查询档案列表
*
* @param mobile
* @param groupId 集团id
* @return 保有客列表 nonull
*/
@GetMapping("/query/by/mobile")
Message<List<CustomerInfoDto>> queryByMobile(@RequestParam("mobile") String mobile, @RequestParam("groupId") Long groupId);
/**
* 通过手机号查询档案列表
*
* @param plateNo
* @param groupId 集团id
* @return 保有客列表 nonull
*/
@GetMapping("/query/by/plateNo")
Message<CustomerInfoDto> queryByPlateNo(@RequestParam("plateNo") String plateNo, @RequestParam("groupId") Long groupId);
/**
* 通过车架号查询档案
*
* @param plateNo
* @param groupId
* @return
*/
@GetMapping("/query/by/frameNo")
Message<CustomerInfoDto> queryByFrameNo(@RequestParam("frameNo") String plateNo, @RequestParam("groupId") Long groupId);
/**
* 批量查询客户档案
*
* @param customerIds 客户档案ids
* @return 客户档案
*/
@GetMapping("/query/batch")
Message<List<CustomerInfoDto>> queryBatch(@RequestParam("customerIds") Long[] customerIds);
/**
* 变更保有客专属服务顾问
*
* @param changeAdviserReq 新的专属服务顾问
* @return 是否变更成功
*/
@PostMapping("/change/adviser")
Message<Boolean> changeAdviser(@Valid @RequestBody ChangeAdviserReq changeAdviserReq);
/**
* 会员关联商家(专属商家和进站的商家)
*
* @param groupId 集团ID
* @param memberId 会员ID
* @return 商家列表
*/
@GetMapping("/dealers")
Message<List<Long>> dealers(@RequestParam("groupId") Long groupId, @RequestParam("memberId") Long memberId);
/**
* 查询接车送修人
*
* @param customerId
* @param plateNo
* @param shopId
* @return
*/
@GetMapping("/receptioner")
Message<CustomerContactDto> queryReceptioner(@RequestParam("customerId") Long customerId,
@RequestParam("plateNo") String plateNo,
@RequestParam("shopId") Long shopId);
/**
* 查询联系人信息
*
* @param customerId
* @param memberId
* @return
*/
@GetMapping("/contactInfo")
Message<CustomerContactDto> queryContactInfo(@RequestParam("customerId") Long customerId, @RequestParam("memberId") Long memberId);
/**
* 修改车型代码
* @param customerId
* @param specCode
* @return
*/
@GetMapping("/modifySpecCode")
Message<Boolean> modifySpecCode(@RequestParam("customerId") Long customerId, @RequestParam("specCode") String specCode);
/**
* 查询顾问能否接车
* @param userId
* @param plateNo
* @return
*/
@GetMapping("/queryReceivable")
Message<ReceptionResultDto> queryReceivable(@RequestParam("userId") Long userId, @RequestParam("plateNo") String plateNo);
/**
* 修改车牌号
* @param changePlateNoReq
* @return
*/
@PostMapping("/updatePlateNo")
Message<Boolean> updatePlateNo(@Valid @RequestBody ChangePlateNoReq changePlateNoReq);
}