Commit 401cd0f8 authored by hujun's avatar hujun

log error edit

parent 974e5efc
......@@ -171,27 +171,27 @@ class CellPhone extends Basic
$field = 'agents_id,users_id,call_type,call_time,time,voice_file';
$where = [];
if ($this->params['start_time']) {
if (!empty($this->params['start_time'])) {
$where['create_time'] = ['> time', $this->params['start_time']];
}
if ($this->params['end_time']) {
if (!empty($this->params['end_time'])) {
$where['create_time'] = ['< time', $this->params['end_time']];
}
if ($this->params['call_name']) {
if (!empty($this->params['call_name'])) {
$where['realName'] = ['LIKE', $this->params['call_name'].'%'];
}
if ($this->params['call_phone']) {
if (!empty($this->params['call_phone'])) {
$where['phone_no'] = ['LIKE',$this->params['call_phone'].'%'];
}
if ($this->params['client_phone']) {
if (!empty($this->params['client_phone'])) {
$where['peer_no'] = ['LIKE',$this->params['client_phone'].'%'];
}
if ($this->params['client_name']) {
if (!empty($this->params['client_name'])) {
$where['user_nick'] = ['LIKE', $this->params['client_name'].'%'];
}
......@@ -218,19 +218,19 @@ class CellPhone extends Basic
$field = 'a.id,b.phone,sum(time) as time,agents_id,call_type,release_time,start_time';
$where = [];
if ($this->params['start_time']) {
if (!empty($this->params['start_time'])) {
$where['create_time'] = ['> time', $this->params['start_time']];
}
if ($this->params['end_time']) {
if (!empty($this->params['end_time'])) {
$where['create_time'] = ['< time', $this->params['end_time']];
}
if ($this->params['agents_name']) {
if (!empty($this->params['agents_name'])) {
$where['realName'] = ['LIKE', $this->params['agents_name'].'%'];
}
if ($this->params['phone']) {
if (!empty($this->params['phone'])) {
$where['phone'] = ['LIKE',$this->params['phone'].'%'];
}
......
......@@ -104,7 +104,7 @@ class Login extends Basic
foreach($nav2 as $k=> $v){
if($r2[$k]){
if(!empty($r2[$k])){
$nav2[$k]['cz'] = $r2[$k];
}
}
......
......@@ -66,12 +66,6 @@
</li>
<li role="presentation">
<a href="/admin.php/index/CellPhoneAgentIndex.html">经纪人通话列表</a>
</li>
<li role="presentation">
<a href="/admin.php/index/phoneList.html">号码池列表</a>
</li>
<li role="presentation">
<a href="/admin.php/index/bindPhoneListIndex.html">号码绑定列表</a>
</li>
<li role="presentation">
<a href="/admin.php/index/CellPhoneIndex.html">通话记录</a>
......
......@@ -26,7 +26,7 @@ class SecretReport extends Model
*/
public function getCallList($pageNo = 1, $pageSize = 15, $order_ = 'id desc', $field = '', $params = '') {
if ($params['realName'] || $params['user_nick']) {
if (!empty($params['realName']) || !empty($params['user_nick'])) {
$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')
......@@ -106,7 +106,7 @@ class SecretReport extends Model
* @return int|string
*/
public function getCallListTotal($params) {
if ($params['realName'] || $params['user_nick']) {
if (!empty($params['realName']) || !empty($params['user_nick'])) {
$data = $this->alias('a')->join('agents b','a.agents_id=b.id','left')
->join('u_users c','a.users_id=c.id','left')
->where($params)
......
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