Commit 708cb0d4 authored by clone's avatar clone

拨打统计redis

parent 8c0ea58f
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace app\api_broker\service; namespace app\api_broker\service;
use app\extra\RedisExt;
use app\model\UPhoneFollowPp; use app\model\UPhoneFollowPp;
/** /**
...@@ -14,17 +15,23 @@ use app\model\UPhoneFollowPp; ...@@ -14,17 +15,23 @@ use app\model\UPhoneFollowPp;
class ClientService class ClientService
{ {
private $uPhoneFollowUpModel; private $uPhoneFollowUpModel;
private $redis;
public function __construct() public function __construct()
{ {
$this->uPhoneFollowUpModel = new UPhoneFollowPp(); $this->uPhoneFollowUpModel = new UPhoneFollowPp();
$this->redis = RedisExt::getRedis();
} }
public function dialTotal($user_id) public function dialTotal($user_id)
{ {
//todo 拨打次数统计
$day = 1; $day = 1;
$num = 5; $num = 5;
if ($this->redis && $this->redis->get("s_agent_call_day") > 0 && $this->redis->get("s_agent_call_number") > 0) {
$day = $this->redis->get("s_agent_call_day");
$num = $this->redis->get("s_agent_call_number");
}
$start_time = date("Y-m-d H:i:s", strtotime("-$day day")); $start_time = date("Y-m-d H:i:s", strtotime("-$day day"));
$end_time = date("Y-m-d H:i:s", time()); $end_time = date("Y-m-d H:i:s", time());
$params["create_time"] = array( "between", array( $start_time, $end_time ) ); $params["create_time"] = array( "between", array( $start_time, $end_time ) );
......
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