Commit 46877159 authored by clone's avatar clone

bug

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