浏览代码

联系方式

cqpCow 1 年之前
父节点
当前提交
b8b395ba1b
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      app/Service/CustomerService.php

+ 8 - 0
app/Service/CustomerService.php

@@ -516,6 +516,14 @@ class CustomerService extends Service
             $id = (new FollowUpRecordService())->getLastVisitData($data['last_visit_time']);
             $model->whereIn('id',$id);
         }
+        if(! empty($data['contact_info'])){
+            $customer_info = CustomerInfo::where('del_time',0)
+                ->where("type",CustomerInfo::type_one)
+                ->where('contact_info','LIKE', '%'.$data['contact_info'].'%')
+                ->select('customer_id')
+                ->get()->toArray();
+            $model->whereIn('id',array_column($customer_info,'customer_id'));
+        }
 
         $list = $this->limit($model,'',$data);
         $list = $this->fillData($list,$data);