Commit 36c1c999 authored by clone's avatar clone

bug

parent 61ee8b32
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace app\api_broker\controller; namespace app\api_broker\controller;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\api_broker\service\ClientService;
use app\api_broker\service\VipService; use app\api_broker\service\VipService;
use app\model\Users; use app\model\Users;
use think\Request; use think\Request;
...@@ -82,7 +83,7 @@ class User extends Basic ...@@ -82,7 +83,7 @@ class User extends Basic
if (isset($params['user_status'])) { if (isset($params['user_status'])) {
$conditions['user_status'] = $params['user_status']; $conditions['user_status'] = $params['user_status'];
}else{ } else {
return $this->response("101", "请求参数错误"); return $this->response("101", "请求参数错误");
} }
...@@ -108,23 +109,29 @@ class User extends Basic ...@@ -108,23 +109,29 @@ class User extends Basic
} }
if (isset($params['start_time']) && isset($params['end_time'])) { if (isset($params['start_time']) && isset($params['end_time'])) {
$start_time = date('Y-m-d H:i:s',$params['start_time']); $start_time = date('Y-m-d H:i:s', $params['start_time']);
$end_time = date('Y-m-d H:i:s',$params['end_time']); $end_time = date('Y-m-d H:i:s', $params['end_time']);
$conditions['create_time'] = array( 'between', array( $start_time, $end_time ) ); $conditions['create_time'] = array( 'between', array( $start_time, $end_time ) );
} }
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();
foreach ($userList as $k => $v) {
$is_show = $clientService->dialTotal($v["user_id"]);
if (!$is_show) {
unset($userList[$k]);
}
}
$vip_services = new VipService(); $vip_services = new VipService();
$data['examine_vip'] = $vip_services->vip($params['user_id']); $data['examine_vip'] = $vip_services->vip($params['user_id']);
$data['user_date'] = $userList; $data['user_date'] = array_merge($userList);
return $this->response("200", 'request success', $data); return $this->response("200", 'request success', $data);
} }
......
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