|
@@ -274,7 +274,12 @@ class Im extends BaseController
|
|
|
public function getContacts()
|
|
public function getContacts()
|
|
|
{
|
|
{
|
|
|
$this->userInfo['cs_uid'] = User::where('user_id', $this->userInfo['user_id'])->value('cs_uid');
|
|
$this->userInfo['cs_uid'] = User::where('user_id', $this->userInfo['user_id'])->value('cs_uid');
|
|
|
- $data = User::getUserList($this->userInfo, [['status', '=', 1], ['user_id', '<>', $this->userInfo['user_id']], ['service_status', '<>', 0]], $this->userInfo['user_id'] , '', $this->userInfo['role']);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ $map = [['status', '=', 1], ['user_id', '<>', $this->userInfo['user_id']]];
|
|
|
|
|
+ if ($this->userInfo['role'] != 0) {
|
|
|
|
|
+ $map[] = ['service_status', '<>', -1];
|
|
|
|
|
+ }
|
|
|
|
|
+ $data = User::getUserList($this->userInfo, $map, $this->userInfo['user_id'] , '', $this->userInfo['role']);
|
|
|
$count=Friend::where(['status'=>2,'friend_user_id'=>$this->uid])->count();
|
|
$count=Friend::where(['status'=>2,'friend_user_id'=>$this->uid])->count();
|
|
|
$time=Friend::where(['friend_user_id'=>$this->uid,'is_invite'=>1])->order('create_time desc')->value('create_time');
|
|
$time=Friend::where(['friend_user_id'=>$this->uid,'is_invite'=>1])->order('create_time desc')->value('create_time');
|
|
|
return success('', $data,$count,$time*1000);
|
|
return success('', $data,$count,$time*1000);
|