|
@@ -315,13 +315,29 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
315
|
315
|
|
316
|
316
|
// 报备有 10 天有效期
|
317
|
317
|
QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
|
318
|
|
- queryWrapper.eq("name", taRecommendCustomer.getName());
|
319
|
318
|
queryWrapper.eq("phone", taRecommendCustomer.getPhone());
|
320
|
319
|
queryWrapper.eq("building_id",taRecommendCustomer.getBuildingId());
|
321
|
320
|
queryWrapper.in("verify_status",CommConstant.VERIFY_AGREE,CommConstant.VERIFY_READY);
|
322
|
321
|
List<TaRecommendCustomer> result = taRecommendCustomerMapper.selectList(queryWrapper);
|
323
|
322
|
if (null != result && result.size() > 0) {
|
324
|
|
- return ResponseBean.error("当前客户已被报备, 不能再次报备", ResponseBean.ERROR_ILLEGAL_PARAMS);
|
|
323
|
+ String conName = "";
|
|
324
|
+ TaPerson conPerson = taPersonMapper.selectById(result.get(0).getRealtyConsultant());
|
|
325
|
+ if (null != conPerson){
|
|
326
|
+ if(params.getString("realtyConsultant").equals(conPerson.getPersonId())){
|
|
327
|
+ return ResponseBean.success("bound");
|
|
328
|
+ }
|
|
329
|
+ conName = conPerson.getName();
|
|
330
|
+ }else {
|
|
331
|
+ TaUser conUser = userService.getById(result.get(0).getRealtyConsultant());
|
|
332
|
+ if(null != conUser){
|
|
333
|
+ if(params.getString("realtyConsultant").equals(conUser.getUserId().toString())){
|
|
334
|
+ return ResponseBean.success("bound");
|
|
335
|
+ }
|
|
336
|
+ conName = conUser.getUserName();
|
|
337
|
+
|
|
338
|
+ }
|
|
339
|
+ }
|
|
340
|
+ return ResponseBean.error("您在当前项目的置业顾问是:"+conName, ResponseBean.ERROR_ILLEGAL_PARAMS);
|
325
|
341
|
}
|
326
|
342
|
|
327
|
343
|
int row = taRecommendCustomerMapper.insert(taRecommendCustomer);
|