Commit 46877159 authored by clone's avatar clone

bug

parent 20c24b80
......@@ -120,21 +120,21 @@ class User extends Basic
if (isset($params['status'])) {
$conditions['status'] = $params['status'];
}
$userList = $this->userModel->selectUserList($field, $conditions, $pageNo, $pageSize, "id desc");
if (empty($userList)) {
return $this->response("200", "此条件没有找到数据");
}
$clientService = new ClientService();
$list = [];
foreach ($userList as $k => $v) {
$is_show = $clientService->dialTotal($v["user_id"]);
if (!$is_show) {
unset($userList[$k]);
if ($is_show) {
array_push($list, $v);
}
}
$vip_services = new VipService();
$data['examine_vip'] = $vip_services->vip($this->agentId);
$data['user_date'] = array_merge($userList);
$data['user_date'] = $list;
return $this->response("200", 'request success', $data);
}
......
......@@ -37,7 +37,7 @@ class ClientService
$params["create_time"] = array( "between", array( $start_time, $end_time ) );
$params["user_id"] = $user_id;
$total = $this->uPhoneFollowUpModel->getSearchCount("", $params);
$total = $this->uPhoneFollowUpModel->getCount( $params);
if ($total > $num) {
return false;
} else {
......
......@@ -87,6 +87,19 @@ class UPhoneFollowPp extends BaseModel
return $r;
}
/**
* @param $join
* @param $where
* @return int
*/
public function getCount( $where)
{
$r = $this
->where($where)
->count();
return $r;
}
public function getUserAgentTotal($params, $join)
{
......
......@@ -542,7 +542,8 @@ class Users extends Model
public function selectUserList($field, $params, $pageNo, $pageSize, $order = "id desc")
{
$result = $this->field($field)
$result = Db::table($this->table)
->field($field)
->where($params)
->order($order)
->page($pageNo)
......
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