Commit dd71bf6a authored by hujun's avatar hujun

通话记录搜索条件

parent ee500d76
...@@ -168,7 +168,7 @@ class CellPhone extends Basic ...@@ -168,7 +168,7 @@ class CellPhone extends Basic
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$report = new SecretReport(); $report = new SecretReport();
$field = 'agents_id,users_id,release_time,start_time,call_type,call_time,time,voice_file,create_time'; $field = 'agents_id,users_id,release_time,start_time,call_type,call_time,time,voice_file';
$where = []; $where = [];
if ($this->params['start_time']) { if ($this->params['start_time']) {
...@@ -184,11 +184,11 @@ class CellPhone extends Basic ...@@ -184,11 +184,11 @@ class CellPhone extends Basic
} }
if ($this->params['call_phone']) { if ($this->params['call_phone']) {
$where['phone_a'] = [$this->params['call_phone']]; $where['phone_no'] = ['LIKE',$this->params['call_phone'].'%'];
} }
if ($this->params['client_phone']) { if ($this->params['client_phone']) {
$where['phone_b'] = [$this->params['client_phone']]; $where['peer_no'] = ['LIKE',$this->params['client_phone'].'%'];
} }
if ($this->params['client_name']) { if ($this->params['client_name']) {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace app\model; namespace app\model;
use Symfony\Component\Yaml\Tests\DumperTest;
use think\Db; use think\Db;
use think\Model; use think\Model;
...@@ -26,7 +27,7 @@ class SecretReport extends Model ...@@ -26,7 +27,7 @@ class SecretReport extends Model
public function getCallList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '') { public function getCallList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '') {
if ($params['realName'] || $params['user_nick']) { if ($params['realName'] || $params['user_nick']) {
$field .= ',a.id'; $field .= ',a.id,a.create_time';
$data = $this->field($field)->alias('a')->join('agents b','a.agents_id=b.id','left') $data = $this->field($field)->alias('a')->join('agents b','a.agents_id=b.id','left')
->join('u_users c','a.users_id=c.id','left') ->join('u_users c','a.users_id=c.id','left')
->where($params) ->where($params)
...@@ -35,7 +36,7 @@ class SecretReport extends Model ...@@ -35,7 +36,7 @@ class SecretReport extends Model
->page($pageNo) ->page($pageNo)
->select(); ->select();
} else { } else {
$field .= ',id'; $field .= ',id,create_time';
$data = $this->field($field) $data = $this->field($field)
->where($params) ->where($params)
->order($order_) ->order($order_)
......
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