Commit ace905b2 by 朱继来

调整客服池新增功能

parent f2eb9d1f
Showing with 3 additions and 2 deletions
...@@ -90,7 +90,8 @@ class KefuModel extends Model ...@@ -90,7 +90,8 @@ class KefuModel extends Model
if ($exists) return [1, '客服已存在']; if ($exists) return [1, '客服已存在'];
$data['sale_id'] = $sales->userId; $sale_id = $sales->userId;
$data['sale_name'] = $sales->name; $data['sale_name'] = $sales->name;
$data['email'] = $email; $data['email'] = $email;
$data['operator_id'] = $request->user->userId; $data['operator_id'] = $request->user->userId;
...@@ -100,7 +101,7 @@ class KefuModel extends Model ...@@ -100,7 +101,7 @@ class KefuModel extends Model
if (!$count) $data['status'] = 1; // 待分配 if (!$count) $data['status'] = 1; // 待分配
$res = $this->create($data); $res = $this->updateOrCreate(['sale_id'=>$sale_id], $data);
if ($res === false) return [1, '新增客服失败']; if ($res === false) return [1, '新增客服失败'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment