|
@@ -88,7 +88,7 @@ class CustomerModel extends Model
|
|
|
$where = [
|
|
|
// 'name' => $data['name'],
|
|
|
'email' => $data['email'],
|
|
|
- 'company' => $data['company'],
|
|
|
+// 'company' => $data['company'],
|
|
|
// 'country' => $data['country'],
|
|
|
'website' => $data['website'],
|
|
|
// 'phone' => $data['phone'],
|
|
@@ -99,7 +99,7 @@ class CustomerModel extends Model
|
|
|
if ($isset) return json(['cdoe' => 100, 'msg' => '此客户已存在']);
|
|
|
$issets = $this->where($where)->where('status','in','1,2,3')->find();
|
|
|
if ($issets) return json(['cdoe' => 100, 'msg' => '此客户状态已经发生改变,无法添加']);
|
|
|
- $issetss = $this->where('email','')->where('company' , $data['company'])->where('website' , $data['website'])->where('status',0)->find();
|
|
|
+ $issetss = $this->where('email','')->where('website' , 'like','%'.$data['website'].'%')->where('status',0)->find();
|
|
|
if ($issetss) {
|
|
|
Db::name('customer')->where('id'.$issetss['id'])->update(['spread_id' => session('uid')]);
|
|
|
Db::name('customer')->where('id'.$issetss['id'])->setInc('people',1);
|
|
@@ -135,7 +135,7 @@ class CustomerModel extends Model
|
|
|
*/
|
|
|
public function checkCustomer($email,$company,$website)
|
|
|
{
|
|
|
- return $this->where('email',$email)->where('company',$company)->where('website','like','%'.$website.'%')->where('status','in','1,2,3')->find();
|
|
|
+ return $this->where('email',$email)->where('website','like','%'.$website.'%')->where('status','in','1,2,3')->find();
|
|
|
}
|
|
|
/**
|
|
|
* 建档人数检测
|