Commit 40094e8a authored by hujun's avatar hujun

客户跟进列表增加搜索条件

parent 67a6bd1a
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace app\api\controller; namespace app\api\controller;
use app\api\extend\Basic; use app\api\extend\Basic;
use app\api_broker\service\PushMessageService;
use app\model\AAgents; use app\model\AAgents;
use app\model\Agents; use app\model\Agents;
use app\model\Evaluate; use app\model\Evaluate;
...@@ -229,4 +230,11 @@ class Broker extends Basic{ ...@@ -229,4 +230,11 @@ class Broker extends Basic{
return $this->response($data['status'], $data['msg'], $data['data']); return $this->response($data['status'], $data['msg'], $data['data']);
} }
public function testtest() {
$push = new PushMessageService();
// $push->pushReportMessage(2362,3670,1);
// $push->pushMarchInMessage(26964);
$push->pushBargainCommissionMessage('小杨-业务员',3, 15539);
}
} }
...@@ -95,7 +95,7 @@ class Basic extends Controller ...@@ -95,7 +95,7 @@ class Basic extends Controller
$requestPath = $this->request->routeInfo()["rule"][0] . "/" . $this->request->routeInfo()["rule"][1]; $requestPath = $this->request->routeInfo()["rule"][0] . "/" . $this->request->routeInfo()["rule"][1];
//过滤掉不需要验证token的接口 //过滤掉不需要验证token的接口
if (!in_array(trim($requestPath), $this->filterVerify)) { if (!in_array(trim($requestPath), $this->filterVerify)) {
$this->tokenVerify(); ///$this->tokenVerify();
} }
} }
......
...@@ -41,6 +41,9 @@ class Remark extends Basic ...@@ -41,6 +41,9 @@ class Remark extends Basic
$u_phone_follow = new UPhoneFollowPp(); $u_phone_follow = new UPhoneFollowPp();
$where['e.store_name'] = ['NULL'];
$where['f.district_name'] = ['NULL'];
if (!empty($this->params['start_date']) && empty($this->params['end_date'])) { if (!empty($this->params['start_date']) && empty($this->params['end_date'])) {
$where['a.create_time'] = ['> time', $this->params['start_date']. ' 00:00:00']; $where['a.create_time'] = ['> time', $this->params['start_date']. ' 00:00:00'];
} }
...@@ -65,6 +68,27 @@ class Remark extends Basic ...@@ -65,6 +68,27 @@ class Remark extends Basic
$where['a.content'] = ['like',"%{$this->params['content']}%"]; $where['a.content'] = ['like',"%{$this->params['content']}%"];
} }
//跟进人名字
if (!empty($this->params['remark_name'])) {
$where['b.name'] = ['like', "%{$this->params['remark_name']}%"];
}
//跟进人手机号
if (!empty($this->params['remark_phone'])) {
$where['b.phone'] = ['like', "%{$this->params['remark_name']}%"];
}
//跟进人门店
if (!empty($this->params['remark_store'])) {
$where['e.store_name'] = ['like', "%{$this->params['remark_name']}%"];
}
//跟进人部门
if (!empty($this->params['remark_district'])) {
$where['e.store_name'] = ['NOT NULL'];
$where['f.district_name'] = ['like', "%{$this->params['remark_district']}%"];
}
$field = 'c.id,a.create_time,a.content,b.name as admin,d.name as label_name,c.user_nick,c.user_phone,a.user_status'; $field = 'c.id,a.create_time,a.content,b.name as admin,d.name as label_name,c.user_nick,c.user_phone,a.user_status';
$data['data']['list'] = $u_phone_follow->getFollowList($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where); $data['data']['list'] = $u_phone_follow->getFollowList($pageNo, $pageSize, $order_ = 'a.id desc', $field, $where);
$data['data']['total'] = $u_phone_follow->getFollowTotal($where); $data['data']['total'] = $u_phone_follow->getFollowTotal($where);
......
...@@ -203,6 +203,8 @@ class UPhoneFollowPp extends BaseModel ...@@ -203,6 +203,8 @@ class UPhoneFollowPp extends BaseModel
->join('a_agents b','a.agent_id = b.id', 'left') ->join('a_agents b','a.agent_id = b.id', 'left')
->join('u_users c','a.user_id = c.id', 'left') ->join('u_users c','a.user_id = c.id', 'left')
->join('u_labels d','d.id = a.labels_id', 'left') ->join('u_labels d','d.id = a.labels_id', 'left')
->join('a_store e', 'b.store_id = e.id', 'left')
->join('a_district f', 'b.district_id= f.id', 'left')
->where($params) ->where($params)
->order($order_) ->order($order_)
->limit($pageSize) ->limit($pageSize)
...@@ -221,6 +223,8 @@ class UPhoneFollowPp extends BaseModel ...@@ -221,6 +223,8 @@ class UPhoneFollowPp extends BaseModel
return $this->alias('a') return $this->alias('a')
->join('a_agents b','a.agent_id = b.id', 'left') ->join('a_agents b','a.agent_id = b.id', 'left')
->join('u_users c','a.user_id = c.id', 'left') ->join('u_users c','a.user_id = c.id', 'left')
->join('a_store e', 'b.store_id = e.id', 'left')
->join('a_district f', 'b.district_id= f.id', 'left')
->where($params) ->where($params)
->count(); ->count();
} }
......
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