Commit 295158d7 authored by zhuwei's avatar zhuwei

bug

parent bbd97aed
......@@ -522,7 +522,7 @@ class Broker extends Basic
// 判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定
//0允许拨打 1不允许拨打
$data['is_outpace_call_num'] = 0;
$clientService = new ClientService();
$clientService = new ClientService($this->siteId);
if (!$clientService->dialTotal($params["user_id"])) {
$data['is_outpace_call_num'] = 1;
}
......
......@@ -103,7 +103,7 @@ class HomePageLog extends Basic
$order = "f.id desc";
$result = $this->uPhoneFollowUpModel->getSearch($pageNo, $pageSize, $order, $field, [], $where_, "");
$clientService = new ClientService();
$clientService = new ClientService($this->siteId);
foreach ($result as $key => $value) {
$agent_params = [];
$agent_params["a.id"] = $value['agent_id'];
......
......@@ -164,7 +164,7 @@ class User extends Basic
return $this->response("200", "此条件没有找到数据");
}
$clientService = new ClientService();
$clientService = new ClientService($this->siteId);
foreach ($userList as $k => $v) {
/*判断是否纯房东 0:否 1:是 start*/
$is_single_homeowner = 0;
......@@ -472,6 +472,7 @@ class User extends Basic
$where['site_ids'] = [ 'LIKE', '%' . $this->siteId . '%' ];
}
$field = 'id,user_nick,agent_id,vip,create_time';
$user = new Users();
$user_res = $user->getLastOrNextUserID($where, $field, $limit = 1, $order, $type);
......@@ -479,16 +480,19 @@ class User extends Basic
return $this->response("201", "查无数据", [ 'user_id' => $params['user_id'] ]);
}
//[ error ] [2]Missing argument 1 for app\model\UPhoneFollowPp::__construct(), called in /data/project/tl_estate/application/api_broker/service/ClientService.php on line 26 and defined[/data/project/tl_estate/application/model/UPhoneFollowPp.php:14]
//[ error ] [8]未定义变量: site_id[/data/project/tl_estate/application/model/UPhoneFollowPp.php:16]
// $model = new AAgents();
/* $result = $model->searchAgentsByKeyword("id,name,phone", [ "id" => $params["agent_id"]]);
$call = new CallPhoneService();
$gresult = $call->getBindNum($user_res['user_phone'],$result[0]['phone']);*/
// 判断当天被拨打是否超过5次
$clientService = new ClientService();
$clientService = new ClientService($this->siteId);
if (!$clientService->dialTotal($user_res[0]['id'])) {
return $this->response("201", "当天被拨打超过5次", [ 'user_id' => $user_res[0]['id'] ]);
}
exit;
//如果非客方
if ($user_res[0]['agent_id'] != $params['agent_id']) {
......@@ -653,7 +657,7 @@ class User extends Basic
$result = $model_agent->searchAgentsByKeyword("id,name,phone", [ "id" => $params["agent_id"] ]);
$call = new CallPhoneService();
$gresult = $call->getBindNum($model_res['user_phone'], $result[0]['phone']);
$clientService = new ClientService();
$clientService = new ClientService($this->siteId);
if (!$clientService->dialTotal($model_res[0]['user_id']) && $gresult == 0) {
return $this->response("201", "当天被拨打超过5次", [ 'id' => $model_res[0]['id'] ]);
}
......
......@@ -21,9 +21,9 @@ class ClientService
private $nowTime;
const SAVE_CALL_NUM = "save_call_num_";
public function __construct()
public function __construct($site_id)
{
$this->uPhoneFollowUpModel = new UPhoneFollowPp();
$this->uPhoneFollowUpModel = new UPhoneFollowPp($site_id);
$this->redis = RedisExt::getRedis();
$this->day = $this->redis->get("s_agent_call_day");
......
......@@ -341,7 +341,7 @@ class Member extends Basic{
0允许拨打 1不允许拨打
start*/
$is_outpace_call_num = 0;
$clientService = new ClientService();
$clientService = new ClientService($this->siteId);
if (!$clientService->dialTotal($v["id"])) {
$is_outpace_call_num = 1;
}
......
......@@ -140,7 +140,7 @@ class Remark extends Basic
/* 判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定 start*/
//0允许拨打 1不允许拨打
$is_outpace_call_num = 0;
$clientService = new ClientService();
$clientService = new ClientService($this->siteId);
if (!$clientService->dialTotal($v["user_id"])) {
$is_outpace_call_num = 1;
}
......@@ -314,7 +314,7 @@ class Remark extends Basic
// 判断当天被拨打是否超过5次,同时判断是否当前经纪人跟当前客户是否有电话绑定
//0允许拨打 1不允许拨打
$data['is_outpace_call_num'] = 0;
$clientService = new ClientService();
$clientService = new ClientService($this->siteId);
if (!$clientService->dialTotal($params["user_id"])) {
$data['is_outpace_call_num'] = 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 to comment