Commit 3c792e86 authored by hujun's avatar hujun

1

parent e0678b29
......@@ -14,18 +14,15 @@ use app\model\UPhoneFollowPp;
*/
class ClientService
{
private $uPhoneFollowUpModel;
private $redis;
private $day;
private $num;
private $nowTime;
const SAVE_CALL_NUM = "save_call_num_";
public function __construct($site_id)
public function __construct()
{
$this->uPhoneFollowUpModel = new UPhoneFollowPp($site_id);
$this->redis = RedisExt::getRedis();
$this->day = $this->redis->get("s_agent_call_day");
$this->num = $this->redis->get("s_agent_call_number");
$this->nowTime = date("Y-m-d", time());
......
......@@ -56,14 +56,8 @@ class PrivacyNumber
->count('id');
if (empty($num)) {
if (!empty($agents_id)) {
$site_id = Db::table('a_agents')->where('id', $agents_id)->value('site_id');
}
if (!empty($site_id)) {
$m_service = new ClientService($site_id);
$m_service->saveCallNumByUserId($post_data[0]['users_id']);
}
$m_service = new ClientService();
$m_service->saveCallNumByUserId($post_data[0]['users_id']);
}
}
......@@ -261,14 +255,8 @@ class PrivacyNumber
$str = date('Y-m-d h:i:s') . ' 容联云话单' . var_export($params, true);
if ($params['duration'] > 0 && $date['users_id']) {
if (!empty($agents_id)) {
$site_id = Db::table('a_agents')->where('id', $agents_id)->value('site_id');
}
if (!empty($site_id)) {
$m_service = new ClientService($site_id);
$m_service->saveCallNumByUserId($date['users_id']);
}
$m_service = new ClientService();
$m_service->saveCallNumByUserId($date['users_id']);
}
Log::write($str, 'rongBilledInformUrl'); //记录日志
return json_encode([ "statusCode" => '000000', 'msg' => '接收成功' ]);
......
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