Commit dd71bf6a authored by hujun's avatar hujun

通话记录搜索条件

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