Commit 229b2238 authored by zhuwei's avatar zhuwei

客户搜索

parent 115f0666
...@@ -13,6 +13,7 @@ use app\api\untils\JwtUntils; ...@@ -13,6 +13,7 @@ use app\api\untils\JwtUntils;
use app\api_broker\extend\Basic; use app\api_broker\extend\Basic;
use app\model\AAgents; use app\model\AAgents;
use app\model\UPhoneFollowPp; use app\model\UPhoneFollowPp;
use app\model\Users;
use think\Request; use think\Request;
class Broker extends Basic class Broker extends Basic
...@@ -137,4 +138,40 @@ class Broker extends Basic ...@@ -137,4 +138,40 @@ class Broker extends Basic
return $this->response("101", "失败!"); return $this->response("101", "失败!");
} }
} }
/**
* 客户搜索
* @return \think\Response
*/
public function user_search()
{
$params = $this->params;
$params['phone_or_name']='22';
if (!isset($params['phone_or_name'])) {
return $this->response("300", "参数不全", [ 'remote_groupid' => '' ]);
}
$phone_or_name = trim($params['phone_or_name']);
$pageSize = 15;
$pageNo = 1;
//主表查询商铺详细信息
$user = new Users();
// 查询数据集
$user_res=$user ->where('user_nick|user_phone','like',"%$phone_or_name%")
->limit($pageSize)
->page($pageNo)
->select();
$user_rescount=$user ->where('user_nick|user_phone','like',"%$phone_or_name%")
->count();
dump($user_rescount);
// var_dump($user_res);
// exit;
if ($user_res) {
return $this->response("200", "success!", $user_res);
} else {
return $this->response("101", "失败!");
}
}
} }
\ No newline at end of file
...@@ -225,6 +225,7 @@ Route::group('broker', [ ...@@ -225,6 +225,7 @@ Route::group('broker', [
'labelEdit' => ['api_broker/label/index',['method'=>'get|post']], //编辑标签 'labelEdit' => ['api_broker/label/index',['method'=>'get|post']], //编辑标签
'getLabelsList' => ['api_broker/label/getLabelsList',['method'=>'get']], //标签列表 'getLabelsList' => ['api_broker/label/getLabelsList',['method'=>'get']], //标签列表
'add_phone_follow_up' => ['api_broker/broker/add_phone_follow_up',['method'=>'get|post']],//新增-客户电话跟进 'add_phone_follow_up' => ['api_broker/broker/add_phone_follow_up',['method'=>'get|post']],//新增-客户电话跟进
'user_search' => ['api_broker/broker/user_search',['method'=>'get|post']],//客户搜索
]); ]);
......
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