Commit f9e41b88 authored by clone's avatar clone

bug

parent a3bdedd2
...@@ -74,13 +74,13 @@ class User extends Basic ...@@ -74,13 +74,13 @@ class User extends Basic
"money_end" => 10000,//租金 "money_end" => 10000,//租金
"start_time" => "2016-05-25", "start_time" => "2016-05-25",
"end_time" => "2018-05-30", "end_time" => "2018-05-30",
"id" => 1, "id" => 1,
"user_name" => "12312", "user_name" => "12312",
"user_phone" => "138171212", "user_phone" => "138171212",
"pageNo" => 1, "pageNo" => 1,
"agent_id" => 5741,//传经纪人id代表我得客户 "agent_id" => 5741,//传经纪人id代表我得客户
"pageSize" => 15, "pageSize" => 15,
"status" => 0, "status" => 0,
);*/ );*/
$field = "id as user_id,sex,user_name,city,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand,vip,user_label,source_intro"; $field = "id as user_id,sex,user_name,city,user_phone,user_status,agent_id,create_time,industry_type,price_demand,area_demand,vip,user_label,source_intro";
...@@ -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)) {
...@@ -458,9 +466,9 @@ class User extends Basic ...@@ -458,9 +466,9 @@ class User extends Basic
// $model = new AAgents(); // $model = new AAgents();
/* $result = $model->searchAgentsByKeyword("id,name,phone", [ "id" => $params["agent_id"]]); /* $result = $model->searchAgentsByKeyword("id,name,phone", [ "id" => $params["agent_id"]]);
$call = new CallPhoneService(); $call = new CallPhoneService();
$gresult = $call->getBindNum($user_res['user_phone'],$result[0]['phone']);*/ $gresult = $call->getBindNum($user_res['user_phone'],$result[0]['phone']);*/
// 判断当天被拨打是否超过5次 // 判断当天被拨打是否超过5次
$clientService = new ClientService(); $clientService = new ClientService();
if (!$clientService->dialTotal($user_res[0]['id'])) { if (!$clientService->dialTotal($user_res[0]['id'])) {
...@@ -623,13 +631,13 @@ class User extends Basic ...@@ -623,13 +631,13 @@ 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