...
|
...
|
@@ -88,7 +88,7 @@ class LeaveController extends RestBaseController |
|
|
$field = 'l.id,l.to_uid,to.avatar,c.name,content,l.create_time';
|
|
|
} elseif ($this->userId && $this->userType == 3) {//信贷员
|
|
|
$condition['l.to_uid|l.from_uid'] = $this->userId;
|
|
|
$field = 'l.id,l.to_uid,from.avatar,from.user_nickname name,content,l.create_time';
|
|
|
$field = 'l.id,l.to_uid,from.avatar,from.user_nickname name,content,l.create_time,l.from_uid';
|
|
|
//将该业务员的 留言都改为已读状态
|
|
|
Db::name('leave')->where(['to_uid' => $this->userId,'parent_id' => 0])->update(['is_read' => 1]);
|
|
|
$condition2['parent_id'] = ['>',0];
|
...
|
...
|
@@ -110,13 +110,9 @@ class LeaveController extends RestBaseController |
|
|
if (count($result) > 0) {
|
|
|
foreach ($result as $k => $v) {
|
|
|
$reply = Db::name('leave')
|
|
|
->alias('l')
|
|
|
->join('user from','l.from_uid = from.id')
|
|
|
->where(['parent_id' => $v['id']])
|
|
|
->field('l.content,from.id from_uid')
|
|
|
->find();
|
|
|
$result[$k]['reply_info'] = isset($reply['content']) ? $reply['content'] : '';
|
|
|
$result[$k]['from_uid'] = isset($reply['from_uid']) ? $reply['from_uid'] : '';
|
|
|
->column('content');
|
|
|
$result[$k]['reply_info'] = $reply;
|
|
|
$result[$k]['create_time'] = date('Y-m-d',strtotime($v['create_time']));
|
|
|
}
|
|
|
}
|
...
|
...
|
|