张延森 5 years ago
parent
commit
efae751f79

+ 1
- 0
src/main/java/com/huiju/estateagents/controller/MiniAppController.java View File

477
         }
477
         }
478
         TaPerson person = taPersons.get(0);
478
         TaPerson person = taPersons.get(0);
479
         QueryWrapper<TaRecommendCustomer> cus = new QueryWrapper<>();
479
         QueryWrapper<TaRecommendCustomer> cus = new QueryWrapper<>();
480
+        cus.eq("org_id", orgId);
480
         cus.eq("phone", phoneNoInfo.getPhoneNumber());
481
         cus.eq("phone", phoneNoInfo.getPhoneNumber());
481
         cus.orderByDesc("create_date");
482
         cus.orderByDesc("create_date");
482
         List<TaRecommendCustomer> customer = taRecommendCustomerService.list(cus);
483
         List<TaRecommendCustomer> customer = taRecommendCustomerService.list(cus);

+ 3
- 2
src/main/java/com/huiju/estateagents/service/impl/TaRecommendCustomerServiceImpl.java View File

723
         }
723
         }
724
 
724
 
725
         // 已经存在的, 随机返回一条记录
725
         // 已经存在的, 随机返回一条记录
726
-        List<TaRecommendCustomer> custs = getCustomerByPhone(phone);
726
+        List<TaRecommendCustomer> custs = getCustomerByPhone(phone, person.getOrgId());
727
         if (null != custs && custs.size() > 0) {
727
         if (null != custs && custs.size() > 0) {
728
             return custs.get(0);
728
             return custs.get(0);
729
         }
729
         }
798
 
798
 
799
     }
799
     }
800
 
800
 
801
-    private List<TaRecommendCustomer> getCustomerByPhone(String phone) {
801
+    private List<TaRecommendCustomer> getCustomerByPhone(String phone, Integer orgId) {
802
         QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
802
         QueryWrapper<TaRecommendCustomer> queryWrapper = new QueryWrapper<>();
803
+        queryWrapper.eq("org_id", orgId);
803
         queryWrapper.eq("phone", phone);
804
         queryWrapper.eq("phone", phone);
804
         queryWrapper.gt("status", CommConstant.STATUS_DELETE);
805
         queryWrapper.gt("status", CommConstant.STATUS_DELETE);
805
         queryWrapper.orderByDesc("report_date");
806
         queryWrapper.orderByDesc("report_date");