Commit 7cce8e3b authored by hujun's avatar hujun

客户列表搜索

parent 957955cb
...@@ -66,7 +66,7 @@ class Member extends Basic{ ...@@ -66,7 +66,7 @@ class Member extends Basic{
if (!empty($params['user_nick'])) { if (!empty($params['user_nick'])) {
//$where[0] = ['EXP','a.user_phone LIKE "%'.$this->params['phone'].'%" or a.user_nick LIKE "%'.$this->params['phone'].'%"']; //$where[0] = ['EXP','a.user_phone LIKE "%'.$this->params['phone'].'%" or a.user_nick LIKE "%'.$this->params['phone'].'%"'];
$where['a.user_nick'] = ['LIKE','%'.$params['user_nick'].'%']; $where['a.user_name'] = ['LIKE','%'.$params['user_nick'].'%'];
} }
//是否公客 //是否公客
......
...@@ -168,10 +168,8 @@ class Users extends Model ...@@ -168,10 +168,8 @@ class Users extends Model
public function getUserAgentTotal($params, $type = 0) public function getUserAgentTotal($params, $type = 0)
{ {
if ($type == 1) { if ($type == 1) {
$id = $this->field('id')->where('user_phone', 'LIKE', $params['user_phone']['1'] . '%')->find();
$result = $this->alias('a') $result = $this->alias('a')
->where($params) ->where($params)
->where('referrer_id', '=', $id->id)
->count(); ->count();
} elseif ($type == 2) { } elseif ($type == 2) {
$result = $this->alias('a') $result = $this->alias('a')
......
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