CustomerApiService.java
7.06 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
package cn.fw.valhalla.sdk.api;
import cn.fw.data.base.domain.common.Message;
import cn.fw.valhalla.sdk.param.*;
import cn.fw.valhalla.sdk.result.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
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 updateBuyDateParams
*/
@PostMapping("/update/buyDate")
Message<Void> updateCustomerBuyDate(@Valid @RequestBody CustomerUpdateBuyDateParams updateBuyDateParams);
/**
* 新增或更新售后保有客档案
*
* @param param 档案参数
* @return 售后保有客档案
*/
@PostMapping("/new/save")
Message<Long> saveCustomer(@Valid @RequestBody CustomerSaveReq param);
/**
* 查询保有客档案信息
*
* @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 frameNo
* @param groupId
* @return
*/
@GetMapping("/query/by/frameNo")
Message<CustomerInfoDto> queryByFrameNo(@RequestParam("frameNo") String frameNo, @RequestParam("groupId") Long groupId);
/**
* 通过车架号查询车辆信息,包含无档案
*
* @param frameNo 车架号
* @param shopId 门店id
* @return 车辆信息
*/
@GetMapping("/query/vehicle/by/frameNo")
Message<CustomerInfoDto> queryVehicleByFrameNo(@RequestParam("frameNo") String frameNo, @RequestParam("shopId") Long shopId);
/**
* 批量查询客户档案
*
* @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
* @deprecated {@link #updateSpecCode}
*/
@Deprecated
@GetMapping("/modifySpecCode")
Message<Boolean> modifySpecCode(@RequestParam("customerId") Long customerId, @RequestParam("specCode") String specCode);
/**
* 修改车型代码
*
* @param changeSpecCodeReq
* @return
*/
@PostMapping("/modify/spec_code")
Message<Boolean> updateSpecCode(@Valid @RequestBody ChangeSpecCodeReq changeSpecCodeReq);
/**
* 查询顾问能否接车
*
* @param userId
* @param plateNo
* @return
*/
@GetMapping("/queryReceivable")
Message<ReceptionResultDto> queryReceivable(@RequestParam("userId") Long userId, @RequestParam("plateNo") String plateNo);
/**
* 查询不能接车的售后接待人员
*
* @param cusId 档案id
* @return 售后接待人员id集合
*/
@GetMapping("/query/illegal/adviser")
Message<List<Long>> queryIllegalAdviser(@RequestParam("cusId") Long cusId);
/**
* 修改车牌号
*
* @param changePlateNoReq
* @return
*/
@PostMapping("/updatePlateNo")
Message<Boolean> updatePlateNo(@Valid @RequestBody ChangePlateNoReq changePlateNoReq);
/**
* 查询对应memberId的所有保有客档案
*
* @param memberId
* @return
*/
@GetMapping("/queryByMemberId")
Message<List<CarArchiveDTO>> queryByMemberId(@RequestParam("memberId") Long memberId);
/**
* 查询会员认证车辆
*
* @param memberId 会员id
* @return 认证车辆
*/
@GetMapping("/query/vehicle/by/memberId")
Message<List<MemberVehicleDTO>> queryVehicleByMemberId(@RequestParam("memberId") Long memberId);
/**
* 通过发动机号查询档案
*
* @param engineNo
* @param groupId
* @return
*/
@GetMapping("/query/by/engineNo")
Message<CustomerInfoDto> queryByEngineNo(@RequestParam("engineNo") String engineNo, @RequestParam("groupId") Long groupId);
/**
* 通过关键字查询档案列表
*
* @param keyword 关键字 【车主名称、车牌号、车架号后6位】精确查找
* @param groupId 集团id
* @return
*/
@GetMapping("/query/by/keyword")
Message<List<BasicsCustomerDTO>> queryByKeyword(@RequestParam("keyword") String keyword, @RequestParam("groupId") Long groupId);
/**
* 通过车架号查询认证车辆信息
*
* @param vin 车架号
* @return 认证车辆
*/
@GetMapping("/query/vehicle/by/vin")
Message<MemberVehicleDTO> queryVehicle(@RequestParam("vin") String vin);
/**
* 查询保有客数量
*
* @param req 查询参数
* @return 保有客数量
*/
@PostMapping("/query/cus/cnt")
Message<List<CusCntResult>> queryCusCnt(@RequestBody CusCntReq req);
}