|
@@ -67,6 +67,9 @@ public class TaCustomerServiceImpl extends ServiceImpl<TaCustomerMapper, TaCusto
|
67
|
67
|
|
68
|
68
|
@Autowired
|
69
|
69
|
MiniApp miniApp;
|
|
70
|
+
|
|
71
|
+ @Autowired
|
|
72
|
+ private ISysDictService iSysDictService;
|
70
|
73
|
|
71
|
74
|
@Override
|
72
|
75
|
public List<TaPerson> getGroup(Integer customerId) {
|
|
@@ -293,7 +296,8 @@ public class TaCustomerServiceImpl extends ServiceImpl<TaCustomerMapper, TaCusto
|
293
|
296
|
public TaCustomer getByPhoneOrPlate(String phone, String plateNumber) {
|
294
|
297
|
QueryWrapper<TaCustomer> queryWrapper = new QueryWrapper<>();
|
295
|
298
|
queryWrapper.eq(phone != null,"phone", phone).or().eq(plateNumber != null, "plate_number", plateNumber);
|
296
|
|
- queryWrapper.eq(null == phone || null == plateNumber, "customer_id", -1); // 故意设置一个查询不到数据的条件
|
|
299
|
+ // 故意设置一个查询不到数据的条件
|
|
300
|
+ queryWrapper.eq(null == phone || null == plateNumber, "customer_id", -1);
|
297
|
301
|
queryWrapper.orderByDesc("status");
|
298
|
302
|
queryWrapper.orderByDesc("create_date");
|
299
|
303
|
queryWrapper.last("limit 1");
|
|
@@ -304,7 +308,47 @@ public class TaCustomerServiceImpl extends ServiceImpl<TaCustomerMapper, TaCusto
|
304
|
308
|
@Override
|
305
|
309
|
public TaCustomer getWithLastVisit(Integer id) {
|
306
|
310
|
TaCustomer taCustomer = taCustomerMapper.selectById(id);
|
307
|
|
- if (null == taCustomer) return null;
|
|
311
|
+ if (null == taCustomer) {
|
|
312
|
+ return null;
|
|
313
|
+ }
|
|
314
|
+ //获取字典表所有信息
|
|
315
|
+ List<SysDict> dictList = iSysDictService.list();
|
|
316
|
+ dictList.stream().forEach(e -> {
|
|
317
|
+ //对比数据重新赛值
|
|
318
|
+ if (e.getId().equals(taCustomer.getNowArea())){
|
|
319
|
+ taCustomer.setNowAreaLable(e.getLabel());
|
|
320
|
+ }
|
|
321
|
+ if (e.getId().equals(taCustomer.getFamilyWork())){
|
|
322
|
+ taCustomer.setFamilyWorkLable(e.getLabel());
|
|
323
|
+ }
|
|
324
|
+ if (e.getId().equals(Integer.valueOf(taCustomer.getFamilyIndustry()))){
|
|
325
|
+ taCustomer.setFamilyIndustryLable(e.getLabel());
|
|
326
|
+ }
|
|
327
|
+ if (e.getId().equals(Integer.valueOf(taCustomer.getFamilyDuty()))){
|
|
328
|
+ taCustomer.setFamilyDutyLable(e.getLabel());
|
|
329
|
+ }
|
|
330
|
+ if (e.getId().equals(taCustomer.getHousePurchasing())){
|
|
331
|
+ taCustomer.setHousePurchasingLable(e.getLabel());
|
|
332
|
+ }
|
|
333
|
+ if (e.getId().equals(taCustomer.getHouseProperty())){
|
|
334
|
+ taCustomer.setHousePropertyLable(e.getLabel());
|
|
335
|
+ }
|
|
336
|
+ if (e.getId().equals(taCustomer.getHouseLivingArea())){
|
|
337
|
+ taCustomer.setHouseLivingAreaLable(e.getLabel());
|
|
338
|
+ }
|
|
339
|
+ if (e.getId().equals(taCustomer.getHouseType())){
|
|
340
|
+ taCustomer.setHouseTypeLable(e.getLabel());
|
|
341
|
+ }
|
|
342
|
+ if (e.getId().equals(taCustomer.getFamilyStructure())){
|
|
343
|
+ taCustomer.setFamilyStructureLable(e.getLabel());
|
|
344
|
+ }
|
|
345
|
+ if (e.getId().equals(taCustomer.getCustomerAge())){
|
|
346
|
+ taCustomer.setCustomerAgeLable(e.getLabel());
|
|
347
|
+ }
|
|
348
|
+ if (e.getId().equals(Integer.valueOf(taCustomer.getFavorLevel()))){
|
|
349
|
+ taCustomer.setFavorLevelLable(e.getLabel());
|
|
350
|
+ }
|
|
351
|
+ });
|
308
|
352
|
|
309
|
353
|
TaMainUsherRecord taMainUsherRecord = iTaMainUsherRecordService.getTodayRecord(taCustomer.getCustomerId());
|
310
|
354
|
if (null != taMainUsherRecord) {
|