Commit eec053de authored by clone's avatar clone

bug

parent e9f7a294
......@@ -127,7 +127,7 @@ class User extends Basic
$clientService = new ClientService();
$list = [];
foreach ($userList as $k => $v) {
$is_show = $clientService->dialTotal($v["user_phone"]);
$is_show = $clientService->dialTotal($v["user_id"]);
if ($is_show) {
array_push($list, $v);
}
......
......@@ -3,7 +3,6 @@
namespace app\api_broker\service;
use app\extra\RedisExt;
use app\model\BindingPhone;
use app\model\UPhoneFollowPp;
/**
......@@ -15,16 +14,16 @@ use app\model\UPhoneFollowPp;
*/
class ClientService
{
private $bindingPhoneModel;
private $uPhoneFollowUpModel;
private $redis;
public function __construct()
{
$this->bindingPhoneModel = new BindingPhone();
$this->redis = RedisExt::getRedis();
$this->uPhoneFollowUpModel = new UPhoneFollowPp();
$this->redis = RedisExt::getRedis();
}
public function dialTotal($user_phone)
public function dialTotal($user_id)
{
$day = 1;
$num = 5;
......@@ -36,9 +35,9 @@ class ClientService
$start_time = date("Y-m-d H:i:s", strtotime("-$day day"));
$end_time = date("Y-m-d H:i:s", time());
$params["create_time"] = array( "between", array( $start_time, $end_time ) );
$params["phone_b"] = $user_phone;
$params["user_id"] = $user_id;
$total = $this->bindingPhoneModel->getCount($params);
$total = $this->uPhoneFollowUpModel->getCount( $params);
if ($total > $num) {
return false;
} else {
......
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