|
@@ -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");
|