张延森 5 anni fa
parent
commit
efae751f79

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

@@ -477,6 +477,7 @@ public class MiniAppController extends BaseController {
477 477
         }
478 478
         TaPerson person = taPersons.get(0);
479 479
         QueryWrapper<TaRecommendCustomer> cus = new QueryWrapper<>();
480
+        cus.eq("org_id", orgId);
480 481
         cus.eq("phone", phoneNoInfo.getPhoneNumber());
481 482
         cus.orderByDesc("create_date");
482 483
         List<TaRecommendCustomer> customer = taRecommendCustomerService.list(cus);

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

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