Commit f9e41b88 authored by clone's avatar clone

bug

parent a3bdedd2
...@@ -94,17 +94,21 @@ class User extends Basic ...@@ -94,17 +94,21 @@ class User extends Basic
if (isset($params['user_status'])) { if (isset($params['user_status'])) {
$conditions['user_status'] = $params['user_status']; $conditions['user_status'] = $params['user_status'];
} }
$is_search = false;
if (isset($params['id'])) { if (isset($params['id'])) {
$conditions['id'] = $params['id']; $conditions['id'] = $params['id'];
$is_search = true;
} }
if (isset($params['user_name'])) { if (isset($params['user_name'])) {
$conditions['user_name'] = array( "like", "%" . trim($params['user_name']) . "%" ); $conditions['user_name'] = array( "like", "%" . trim($params['user_name']) . "%" );
$is_search = true;
} }
if (isset($params['user_phone'])) { if (isset($params['user_phone'])) {
$conditions['user_phone'] = array( "like", "%" . trim($params['user_phone']) . "%" ); $conditions['user_phone'] = array( "like", "%" . trim($params['user_phone']) . "%" );
$is_search = true;
} }
if (isset($params['yetai'])) { if (isset($params['yetai'])) {
...@@ -146,6 +150,10 @@ class User extends Basic ...@@ -146,6 +150,10 @@ class User extends Basic
$conditions['agent_id'] = $params['agent_id']; $conditions['agent_id'] = $params['agent_id'];
} }
if (!$is_search) {
$conditions['user_label'] = array( "neq", 2 );
}
$userList = $this->userModel->selectUserList($field, $conditions, $pageNo, $pageSize, "id desc"); $userList = $this->userModel->selectUserList($field, $conditions, $pageNo, $pageSize, "id desc");
//dump($userList); //dump($userList);
if (empty($userList)) { if (empty($userList)) {
...@@ -624,12 +632,12 @@ class User extends Basic ...@@ -624,12 +632,12 @@ class User extends Basic
// 判断当天被拨打是否超过5次 // 判断当天被拨打是否超过5次
$model_agent = new AAgents(); $model_agent = new AAgents();
$result = $model_agent->searchAgentsByKeyword("id,name,phone", [ "id" => $params["agent_id"]]); $result = $model_agent->searchAgentsByKeyword("id,name,phone", [ "id" => $params["agent_id"] ]);
$call = new CallPhoneService(); $call = new CallPhoneService();
$gresult = $call->getBindNum($model_res['user_phone'],$result[0]['phone']); $gresult = $call->getBindNum($model_res['user_phone'], $result[0]['phone']);
$clientService = new ClientService(); $clientService = new ClientService();
if (!$clientService->dialTotal($model_res[0]['user_id']) && $gresult==0) { if (!$clientService->dialTotal($model_res[0]['user_id']) && $gresult == 0) {
return $this->response("201", "当天被拨打超过5次", ['id'=>$model_res[0]['id']]); return $this->response("201", "当天被拨打超过5次", [ 'id' => $model_res[0]['id'] ]);
} }
//如果非客方 //如果非客方
......
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 to comment