Your Name 6 年之前
父節點
當前提交
5c85cca759

+ 23
- 2
src/main/java/com.huiju.welcome/controller/TaCustomerController.java 查看文件

12
 import com.huiju.welcome.utils.DateUtils;
12
 import com.huiju.welcome.utils.DateUtils;
13
 import com.huiju.welcome.utils.JWTUtils;
13
 import com.huiju.welcome.utils.JWTUtils;
14
 import com.huiju.welcome.utils.StatusUtils;
14
 import com.huiju.welcome.utils.StatusUtils;
15
+import com.huiju.welcome.utils.StringUtils;
15
 import org.apache.http.HttpStatus;
16
 import org.apache.http.HttpStatus;
16
 import org.slf4j.Logger;
17
 import org.slf4j.Logger;
17
 import org.slf4j.LoggerFactory;
18
 import org.slf4j.LoggerFactory;
57
     @Autowired
58
     @Autowired
58
     ISysUserService iSysUserService;
59
     ISysUserService iSysUserService;
59
 
60
 
61
+    @Autowired
62
+    ITaCarService iTaCarService;
63
+
60
     /**
64
     /**
61
      * 保存对象
65
      * 保存对象
62
      * @param taCustomer 实体对象
66
      * @param taCustomer 实体对象
77
         taCustomer.setConsultantId(user.getUserId());
81
         taCustomer.setConsultantId(user.getUserId());
78
         taCustomer.setRealtyConsultant(user.getUsername());
82
         taCustomer.setRealtyConsultant(user.getUsername());
79
 
83
 
84
+        if (!StringUtils.isEmpty(taCustomer.getPlateNumber())) {
85
+            TaCar taCar = iTaCarService.getById(taCustomer.getPlateNumber());
86
+            taCustomer.setCarColor(taCar.getColor());
87
+            taCustomer.setCarModel(taCar.getCarModel());
88
+        }
89
+
80
         ResponseBean responseBean = new ResponseBean();
90
         ResponseBean responseBean = new ResponseBean();
81
         try {
91
         try {
82
             // 会员保存之前, 先保存人员
92
             // 会员保存之前, 先保存人员
113
             iTaCustomerMapService.saveBatch(customerMapList);
123
             iTaCustomerMapService.saveBatch(customerMapList);
114
 
124
 
115
             // 新增会员来访信息
125
             // 新增会员来访信息
116
-            iTaMainUsherRecordService.newRecordByConsultant(taCustomer, follows);
126
+            if (!StringUtils.isEmpty(taCustomer.getAvatar())) {
127
+                iTaMainUsherRecordService.newRecordByConsultant(taCustomer, follows);
128
+            }
117
 
129
 
118
             taCustomer.setStatus(StatusUtils.Normal);
130
             taCustomer.setStatus(StatusUtils.Normal);
119
             taCustomer.setCreateDate(LocalDateTime.now());
131
             taCustomer.setCreateDate(LocalDateTime.now());
168
         TaCustomer taCustomer = JSONObject.parseObject(paramStr, TaCustomer.class);
180
         TaCustomer taCustomer = JSONObject.parseObject(paramStr, TaCustomer.class);
169
         JSONArray follows = params.getJSONArray("follows");
181
         JSONArray follows = params.getJSONArray("follows");
170
 
182
 
183
+        if (!StringUtils.isEmpty(taCustomer.getPlateNumber()) && StringUtils.isEmpty(taCustomer.getCarModel())) {
184
+            TaCar taCar = iTaCarService.getById(taCustomer.getPlateNumber());
185
+            taCustomer.setCarColor(taCar.getColor());
186
+            taCustomer.setCarModel(taCar.getCarModel());
187
+        }
188
+
171
         ResponseBean responseBean = new ResponseBean();
189
         ResponseBean responseBean = new ResponseBean();
172
         try {
190
         try {
173
 
191
 
200
 //                taCustomer.setRemark(originRemark);
218
 //                taCustomer.setRemark(originRemark);
201
 //            }
219
 //            }
202
 
220
 
203
-            iTaMainUsherRecordService.updateByCustomer(taCustomer, follows, JWTUtils.getSubject(request));
221
+            if (!StringUtils.isEmpty(taCustomer.getAvatar())) {
222
+                iTaMainUsherRecordService.updateByCustomer(taCustomer, follows, JWTUtils.getSubject(request));
223
+            }
204
 
224
 
205
             //taCustomer.setRemark(null);
225
             //taCustomer.setRemark(null);
206
             if (iTaCustomerService.updateById(taCustomer)){
226
             if (iTaCustomerService.updateById(taCustomer)){
241
 
261
 
242
             responseBean.addSuccess(cust);
262
             responseBean.addSuccess(cust);
243
         }catch (Exception e){
263
         }catch (Exception e){
264
+            e.printStackTrace();
244
             logger.error("taCustomerGetByID -=- {}",e.toString());
265
             logger.error("taCustomerGetByID -=- {}",e.toString());
245
             responseBean.addError(e.getMessage());
266
             responseBean.addError(e.getMessage());
246
         }
267
         }

+ 6
- 2
src/main/java/com.huiju.welcome/controller/TaGoodsOrdersController.java 查看文件

49
     public ITaMainUsherRecordService iTaMainUsherRecordService;
49
     public ITaMainUsherRecordService iTaMainUsherRecordService;
50
     @Autowired
50
     @Autowired
51
     public ITaCustomerService iTaCustomerService;
51
     public ITaCustomerService iTaCustomerService;
52
+    @Autowired
53
+    public ITaWechatUserService iTaWechatUserService;
52
 
54
 
53
 
55
 
54
     /**
56
     /**
61
         ResponseBean responseBean = new ResponseBean();
63
         ResponseBean responseBean = new ResponseBean();
62
         try {
64
         try {
63
             String userId = JWTUtils.getSubject(request);
65
             String userId = JWTUtils.getSubject(request);
64
-            SysUser sysUser = iSysUserService.getById(userId);
66
+            TaWechatUser user = iTaWechatUserService.getById(userId);
67
+
68
+            SysUser sysUser = iSysUserService.getById(user.getPersonId());
65
             taGoodsOrders.setUserId(sysUser.getUserId());
69
             taGoodsOrders.setUserId(sysUser.getUserId());
66
             taGoodsOrders.setUserName(sysUser.getUsername());
70
             taGoodsOrders.setUserName(sysUser.getUsername());
67
             taGoodsOrders.setUserType(sysUser.getUserIdentity());
71
             taGoodsOrders.setUserType(sysUser.getUserIdentity());
74
                 //
78
                 //
75
                 TaCustomer cust = iTaCustomerService.getById(taGoodsOrders.getCustomerId());
79
                 TaCustomer cust = iTaCustomerService.getById(taGoodsOrders.getCustomerId());
76
                 if (cust != null) {
80
                 if (cust != null) {
77
-                    boolean ok = iTaMainUsherRecordService.newRecordByConsultant(cust, null);
81
+                    boolean ok = iTaMainUsherRecordService.newRecordByConsultant(cust, new JSONArray());
78
 
82
 
79
                     if (!ok) {
83
                     if (!ok) {
80
                         return ResponseBean.error("更新客户到访失败", HttpStatus.SC_INTERNAL_SERVER_ERROR);
84
                         return ResponseBean.error("更新客户到访失败", HttpStatus.SC_INTERNAL_SERVER_ERROR);

+ 1
- 1
src/main/java/com.huiju.welcome/controller/TaWechatUserController.java 查看文件

94
             map.put("identity", "");
94
             map.put("identity", "");
95
         } else if (null != taWechatUser.getPersonId()) {
95
         } else if (null != taWechatUser.getPersonId()) {
96
             SysUser sysUser = iSysUserService.getById(taWechatUser.getPersonId());
96
             SysUser sysUser = iSysUserService.getById(taWechatUser.getPersonId());
97
-            if (StatusUtils.Normal == sysUser.getStatus()) {
97
+            if (null != sysUser && StatusUtils.Normal == sysUser.getStatus()) {
98
                 map.put("identity", sysUser.getUserIdentity());
98
                 map.put("identity", sysUser.getUserIdentity());
99
             }
99
             }
100
         }
100
         }

+ 2
- 0
src/main/java/com.huiju.welcome/model/TaCustomer.java 查看文件

64
 
64
 
65
     private String realtyConsultant;
65
     private String realtyConsultant;
66
 
66
 
67
+    private String carColor;
68
+
67
     @TableField(exist = false)
69
     @TableField(exist = false)
68
     private List<TaPerson> group;
70
     private List<TaPerson> group;
69
 
71
 

+ 2
- 0
src/main/java/com.huiju.welcome/model/TaFirstUsherRecord.java 查看文件

59
     private String driverImage;
59
     private String driverImage;
60
 
60
 
61
     private String licenseImage;
61
     private String licenseImage;
62
+
63
+    private String phone;
62
 }
64
 }

+ 3
- 0
src/main/java/com.huiju.welcome/service/ITaMainUsherRecordService.java 查看文件

5
 import com.baomidou.mybatisplus.extension.service.IService;
5
 import com.baomidou.mybatisplus.extension.service.IService;
6
 import com.huiju.welcome.common.base.ResponseBean;
6
 import com.huiju.welcome.common.base.ResponseBean;
7
 import com.huiju.welcome.model.TaCustomer;
7
 import com.huiju.welcome.model.TaCustomer;
8
+import com.huiju.welcome.model.TaFirstUsherRecord;
8
 import com.huiju.welcome.model.TaMainUsherRecord;
9
 import com.huiju.welcome.model.TaMainUsherRecord;
9
 import com.huiju.welcome.model.TaPerson;
10
 import com.huiju.welcome.model.TaPerson;
10
 
11
 
48
     TaMainUsherRecord getTodayRecord(Integer customerId);
49
     TaMainUsherRecord getTodayRecord(Integer customerId);
49
     
50
     
50
     boolean updateMainUsherRecord(TaMainUsherRecord taMainUsherRecord, Integer customerId, String subject);
51
     boolean updateMainUsherRecord(TaMainUsherRecord taMainUsherRecord, Integer customerId, String subject);
52
+
53
+    TaMainUsherRecord newRecordByFirstUsher(TaFirstUsherRecord taFirstUsherRecord, TaCustomer taCustomer);
51
 }
54
 }

+ 1
- 1
src/main/java/com.huiju.welcome/service/impl/TaCarRecordServiceImpl.java 查看文件

115
             if (null != personId && personId > 0) {
115
             if (null != personId && personId > 0) {
116
                 // 是否内部人员
116
                 // 是否内部人员
117
                 TaPerson taPerson = iTaPersonService.getByIdOrReal(personId);
117
                 TaPerson taPerson = iTaPersonService.getByIdOrReal(personId);
118
-                if (null != taPerson.getTypeId() && taPerson.getTypeId() == CommConstant.TYPE_INNER_PERSON) {
118
+                if (null != taPerson && null != taPerson.getTypeId() && taPerson.getTypeId() == CommConstant.TYPE_INNER_PERSON) {
119
                     taCarRecordMapper.insert(taCarRecord);
119
                     taCarRecordMapper.insert(taCarRecord);
120
                     iTaCarService.newCarByDevice(taCarRecord);
120
                     iTaCarService.newCarByDevice(taCarRecord);
121
                     return true;
121
                     return true;

+ 22
- 3
src/main/java/com.huiju.welcome/service/impl/TaCustomerServiceImpl.java 查看文件

50
     @Autowired
50
     @Autowired
51
     ITaMainUsherRecordService iTaMainUsherRecordService;
51
     ITaMainUsherRecordService iTaMainUsherRecordService;
52
 
52
 
53
+    @Autowired
54
+    ITaFirstUsherRecordService iTaFirstUsherRecordService;
55
+
53
     @Autowired
56
     @Autowired
54
     ITaVisitorAppointmentService iTaVisitorAppointmentService;
57
     ITaVisitorAppointmentService iTaVisitorAppointmentService;
55
 
58
 
240
 
243
 
241
     @Override
244
     @Override
242
     public Map<String, Object> getHistoryRecBy(Map<String, Object> filters) {
245
     public Map<String, Object> getHistoryRecBy(Map<String, Object> filters) {
246
+        String phone = filters.get("phone").toString();
243
         Map<String, Object> result = new HashMap<String, Object>(){{
247
         Map<String, Object> result = new HashMap<String, Object>(){{
244
-            put("phone", filters.get("phone").toString());
248
+            put("phone", phone);
245
         }};
249
         }};
246
 
250
 
247
         List<TaVisitorAppointment> appointments = iTaVisitorAppointmentService.getAppointmentsBy(filters);
251
         List<TaVisitorAppointment> appointments = iTaVisitorAppointmentService.getAppointmentsBy(filters);
255
             result.put("customerId", "");
259
             result.put("customerId", "");
256
         }
260
         }
257
 
261
 
258
-        List<TaCustomer> custs = taCustomerMapper.getSomeCustMayBe(null, filters.get("phone").toString());
262
+        List<TaCustomer> custs = taCustomerMapper.getSomeCustMayBe(null, phone);
259
         if (null != custs && custs.size() > 0) {
263
         if (null != custs && custs.size() > 0) {
260
             result.put("source", "customer");
264
             result.put("source", "customer");
261
             result.put("name", custs.get(0).getCustomerName());
265
             result.put("name", custs.get(0).getCustomerName());
267
             result.put("customerId", custs.get(0).getCustomerId());
271
             result.put("customerId", custs.get(0).getCustomerId());
268
         }
272
         }
269
 
273
 
270
-        return result;
274
+        // 如果车牌不存在, 查询车辆来访记录
275
+        // 只使用最近的一次记录
276
+        if (null == result.get("plateNumber")) {
277
+            QueryWrapper<TaFirstUsherRecord> queryWrapper = new QueryWrapper<>();
278
+            queryWrapper.eq("phone", phone);
279
+            queryWrapper.ge("status", StatusUtils.Ready);
280
+            queryWrapper.orderByDesc("visite_date");
281
+            queryWrapper.last("limit 1");
282
+
283
+            TaFirstUsherRecord taFirstUsherRecord = iTaFirstUsherRecordService.getOne(queryWrapper);
284
+            if (null != taFirstUsherRecord && null != taFirstUsherRecord.getPlateNumber()) {
285
+                result.put("plateNumber", taFirstUsherRecord.getPlateNumber());
286
+            }
287
+        }
288
+
289
+      return result;
271
     }
290
     }
272
 
291
 
273
     @Override
292
     @Override

+ 29
- 4
src/main/java/com.huiju.welcome/service/impl/TaFirstUsherRecordServiceImpl.java 查看文件

121
         }
121
         }
122
 
122
 
123
         // 查找客户
123
         // 查找客户
124
-        TaCustomer taCustomer = iTaCustomerService.getByPhoneOrPlate(null, taFirstUsherRecord.getPlateNumber());
124
+        TaCustomer taCustomer = iTaCustomerService.getByPhoneOrPlate(taFirstUsherRecord.getPhone(), taFirstUsherRecord.getPlateNumber());
125
         if (null == taCustomer) return true;
125
         if (null == taCustomer) return true;
126
 
126
 
127
         // 更新车型
127
         // 更新车型
128
         if (null != taFirstUsherRecord.getCarModel()) {
128
         if (null != taFirstUsherRecord.getCarModel()) {
129
             taCustomer.setCarModel(taFirstUsherRecord.getCarModel());
129
             taCustomer.setCarModel(taFirstUsherRecord.getCarModel());
130
-            iTaCustomerService.updateById(taCustomer);
130
+            taCustomer.setCarColor(taFirstUsherRecord.getColor());
131
         }
131
         }
132
 
132
 
133
+        // 更新车牌
134
+        if (StringUtils.isEmpty(taCustomer.getPlateNumber())) {
135
+            taCustomer.setPlateNumber(taFirstUsherRecord.getPlateNumber());
136
+        }
137
+
138
+        iTaCustomerService.updateById(taCustomer);
139
+
133
         // 更新到访记录
140
         // 更新到访记录
134
         TaMainUsherRecord taMainUsherRecord = iTaMainUsherRecordService.getTodayRecord(taCustomer.getCustomerId());
141
         TaMainUsherRecord taMainUsherRecord = iTaMainUsherRecordService.getTodayRecord(taCustomer.getCustomerId());
142
+        if (null == taMainUsherRecord) {
143
+            iTaMainUsherRecordService.newRecordByFirstUsher(taFirstUsherRecord, taCustomer);
144
+        } else {
145
+
146
+            if (null != taFirstUsherRecord.getCarModel()) {
147
+                taMainUsherRecord.setCarModel(taFirstUsherRecord.getCarModel());
148
+                taMainUsherRecord.setColor(taFirstUsherRecord.getColor());
149
+            }
150
+
151
+            if (StringUtils.isEmpty(taMainUsherRecord.getPlateNumber())) {
152
+                taMainUsherRecord.setPlateNumber(taFirstUsherRecord.getPlateNumber());
153
+            }
135
 
154
 
136
-        if (null != taMainUsherRecord && null != taFirstUsherRecord.getCarModel()) {
137
-            taMainUsherRecord.setCarModel(taFirstUsherRecord.getCarModel());
138
             iTaMainUsherRecordService.updateById(taMainUsherRecord);
155
             iTaMainUsherRecordService.updateById(taMainUsherRecord);
139
         }
156
         }
140
 
157
 
173
 
190
 
174
     private void notifyConsultant(TaFirstUsherRecord taFirstUsherRecord) {
191
     private void notifyConsultant(TaFirstUsherRecord taFirstUsherRecord) {
175
         String plateNumber = taFirstUsherRecord.getPlateNumber();
192
         String plateNumber = taFirstUsherRecord.getPlateNumber();
193
+//        String phone = taFirstUsherRecord.getPhone();
194
+
195
+//        TaCustomer taCustomer = iTaCustomerService.getByPhoneOrPlate(phone, plateNumber);
196
+//        if (null != taCustomer) {
197
+//            try {
198
+//                iTaCustomerService.notifyConsultant(taCustomer);
199
+//            } catch (Exception e) {}
200
+//        }
176
 
201
 
177
         // 依据车牌判断是否老客户来访
202
         // 依据车牌判断是否老客户来访
178
         if (!StringUtils.isEmpty(plateNumber)) {
203
         if (!StringUtils.isEmpty(plateNumber)) {

+ 32
- 2
src/main/java/com.huiju.welcome/service/impl/TaMainUsherRecordServiceImpl.java 查看文件

109
 
109
 
110
     @Override
110
     @Override
111
     public boolean newRecordByConsultant(TaCustomer taCustomer, JSONArray follows) {
111
     public boolean newRecordByConsultant(TaCustomer taCustomer, JSONArray follows) {
112
-        if (StringUtils.isEmpty(taCustomer.getRemark()) && (null == follows || follows.size() == 0)) {
112
+        if (StringUtils.isEmpty(taCustomer.getRemark()) && null == follows) {
113
             return false;
113
             return false;
114
         }
114
         }
115
 
115
 
147
         taMainUsherRecord.setChannel(taCustomer.getChannel());
147
         taMainUsherRecord.setChannel(taCustomer.getChannel());
148
         taMainUsherRecord.setPurpose(taCustomer.getPurpose());
148
         taMainUsherRecord.setPurpose(taCustomer.getPurpose());
149
         taMainUsherRecord.setPlateNumber(taCustomer.getPlateNumber());
149
         taMainUsherRecord.setPlateNumber(taCustomer.getPlateNumber());
150
+        taMainUsherRecord.setCarModel(taCustomer.getCarModel());
151
+        taMainUsherRecord.setColor(taCustomer.getCarColor());
150
         taMainUsherRecord.setVisiteDate(LocalDateTime.now());
152
         taMainUsherRecord.setVisiteDate(LocalDateTime.now());
151
         taMainUsherRecord.setRemark(taCustomer.getRemark());
153
         taMainUsherRecord.setRemark(taCustomer.getRemark());
152
 
154
 
496
     
498
     
497
         return true;
499
         return true;
498
     }
500
     }
499
-    
501
+
502
+    @Override
503
+    public TaMainUsherRecord newRecordByFirstUsher(TaFirstUsherRecord taFirstUsherRecord, TaCustomer taCustomer) {
504
+        TaMainUsherRecord taMainUsherRecord = new TaMainUsherRecord();
505
+        taMainUsherRecord.setColor(taFirstUsherRecord.getColor());
506
+        taMainUsherRecord.setPlateNumber(taFirstUsherRecord.getPlateNumber());
507
+        taMainUsherRecord.setStatus(StatusUtils.Normal);
508
+        taMainUsherRecord.setAvatar(taFirstUsherRecord.getDriverImage());
509
+        taMainUsherRecord.setPhone(taFirstUsherRecord.getPhone());
510
+        taMainUsherRecord.setVisiteDate(taFirstUsherRecord.getVisiteDate());
511
+        taMainUsherRecord.setCarModel(taFirstUsherRecord.getCarModel());
512
+        taMainUsherRecord.setChannel(taFirstUsherRecord.getChannel());
513
+        taMainUsherRecord.setPurpose(taFirstUsherRecord.getPurpose());
514
+        taMainUsherRecord.setCarImage(taFirstUsherRecord.getCarImage());
515
+
516
+        if (null != taCustomer) {
517
+            taMainUsherRecord.setPersonId(taCustomer.getCustomerId());
518
+            taMainUsherRecord.setCustomerId(taCustomer.getCustomerId());
519
+            taMainUsherRecord.setConsultantId(taCustomer.getConsultantId());
520
+            taMainUsherRecord.setPersonName(taCustomer.getCustomerName());
521
+            taMainUsherRecord.setRealtyConsultant(taCustomer.getRealtyConsultant());
522
+            taMainUsherRecord.setSex(taCustomer.getSex());
523
+            taMainUsherRecord.setPhone(taCustomer.getPhone());
524
+        }
525
+
526
+        taMainUsherRecordMapper.insert(taMainUsherRecord);
527
+        return taMainUsherRecord;
528
+    }
529
+
500
     private TaMainUsherRecord newRecordByPerson(TaPerson taPerson) {
530
     private TaMainUsherRecord newRecordByPerson(TaPerson taPerson) {
501
         TaMainUsherRecord taMainUsherRecord = new TaMainUsherRecord();
531
         TaMainUsherRecord taMainUsherRecord = new TaMainUsherRecord();
502
         taMainUsherRecord.setPersonName(taPerson.getName());
532
         taMainUsherRecord.setPersonName(taPerson.getName());

+ 26
- 1
src/main/java/com.huiju.welcome/service/impl/TaPersonServiceImpl.java 查看文件

70
     @Autowired
70
     @Autowired
71
     private ITaVisitingWordsService visitingWordsService;
71
     private ITaVisitingWordsService visitingWordsService;
72
 
72
 
73
+    @Autowired
74
+    private ITaCustomerService iTaCustomerService;
75
+
73
     @Autowired
76
     @Autowired
74
     private XFYun xfYun;
77
     private XFYun xfYun;
75
     
78
     
368
         String words = taPerson.getWords();
371
         String words = taPerson.getWords();
369
         Integer sex = "2".equals(taPerson.getSex()) ? 2 : 1;
372
         Integer sex = "2".equals(taPerson.getSex()) ? 2 : 1;
370
         String personName = taPerson.getName();
373
         String personName = taPerson.getName();
371
-        if (null == personName) personName = "";
374
+
375
+        // 是否有映射客户
376
+        TaCustomer taCustomer = iTaCustomerService.getSameByPerson(taPerson.getRealId());
377
+        if (null != taCustomer) {
378
+            if (null != taCustomer.getSex()) {
379
+                sex = taCustomer.getSex();
380
+            }
381
+
382
+            personName = taCustomer.getCustomerName();
383
+        }
384
+        if (null == personName || "".equals(personName)) {
385
+            personName = "";
386
+        } else {
387
+            // 客户名称只取姓
388
+            personName = personName.substring(0, 1);
389
+            if (1 == sex) {
390
+                personName += "先生";
391
+            } else {
392
+                personName += "女士";
393
+            }
394
+        }
395
+
396
+        taPerson.setName(personName);
372
 
397
 
373
         // 检查是不是有定制语音
398
         // 检查是不是有定制语音
374
         QueryWrapper<TaCustomWords> wrapper = new QueryWrapper<>();
399
         QueryWrapper<TaCustomWords> wrapper = new QueryWrapper<>();

+ 1
- 1
src/main/java/com.huiju.welcome/utils/CommConstant.java 查看文件

6
     public final static String IDENTITY_MAINUSHER = "main-usher";
6
     public final static String IDENTITY_MAINUSHER = "main-usher";
7
     public final static String IDENTITY_BARUSHER = "bar-usher";
7
     public final static String IDENTITY_BARUSHER = "bar-usher";
8
 
8
 
9
-    public final static String PAGE_MY_CUSTOMER = "pages/client/myclient/myclient";
9
+    public final static String PAGE_MY_CUSTOMER = "pages/client/clientdetail/clientdetail";
10
 
10
 
11
     public final static String WECHAT_CLIENT_MINIAPP = "miniapp";
11
     public final static String WECHAT_CLIENT_MINIAPP = "miniapp";
12
 
12
 

+ 6
- 6
src/main/resources/application.yml 查看文件

1
 spring:
1
 spring:
2
   datasource:
2
   datasource:
3
     driver-class-name: com.mysql.cj.jdbc.Driver
3
     driver-class-name: com.mysql.cj.jdbc.Driver
4
-#    url: jdbc:mysql://rm-uf6z3z6jq11x653d77o.mysql.rds.aliyuncs.com:3306/welcome3?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
5
-#    username: welcome
6
-#    password: s190QU2#z%hdU%^FPkY9qjls
7
-    url: jdbc:mysql://47.101.36.130:3306/welcome3?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
8
-    username: root
9
-    password: Wt4q*/9}i00q@0a4jM{z6O#h129@F/
4
+    url: jdbc:mysql://rm-uf6z3z6jq11x653d77o.mysql.rds.aliyuncs.com:3306/welcome3?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
5
+    username: welcome
6
+    password: s190QU2#z%hdU%^FPkY9qjls
7
+#    url: jdbc:mysql://47.101.36.130:3306/welcome3?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull
8
+#    username: root
9
+#    password: Wt4q*/9}i00q@0a4jM{z6O#h129@F/
10
   servlet:
10
   servlet:
11
     multipart:
11
     multipart:
12
       max-file-size: 1024MB
12
       max-file-size: 1024MB

+ 4
- 5
src/main/resources/mapper/TaCustomerMapper.xml 查看文件

21
     <select id="customerPage" resultType="com.huiju.welcome.model.TaCustomer">
21
     <select id="customerPage" resultType="com.huiju.welcome.model.TaCustomer">
22
         select
22
         select
23
         *,
23
         *,
24
-        tct.to_user_name as agentUserName,
25
-        tct.to_user_id as agentUserId,
26
-        tct.transfer_id as transferId
24
+        consultant_id as agentUserId,
25
+        realty_consultant as agentUserName,
26
+        "" as transferId
27
         from ta_customer tac
27
         from ta_customer tac
28
-        left join ta_customer_transfer tct on tac.customer_id = tct.customer_id
29
         <where>
28
         <where>
30
             <if test="customerName !=null and customerName != ''">
29
             <if test="customerName !=null and customerName != ''">
31
                 and tac.customer_name LIKE CONCAT('%',#{customerName},'%')
30
                 and tac.customer_name LIKE CONCAT('%',#{customerName},'%')
39
                 and   tac.plate_number LIKE CONCAT('%',#{platNumber},'%')
38
                 and   tac.plate_number LIKE CONCAT('%',#{platNumber},'%')
40
             </if>
39
             </if>
41
             <if test="agentUserId != null">
40
             <if test="agentUserId != null">
42
-                and tct.to_user_id = #{agentUserId}
41
+                and tac.consultant_id = #{agentUserId}
43
             </if>
42
             </if>
44
         </where>
43
         </where>
45
         order by create_date desc
44
         order by create_date desc