diff --git a/Server/application/cunkebao/controller/friend/GetFriendListV1Controller.php b/Server/application/cunkebao/controller/friend/GetFriendListV1Controller.php index 6f3f3a00..bf5881b1 100644 --- a/Server/application/cunkebao/controller/friend/GetFriendListV1Controller.php +++ b/Server/application/cunkebao/controller/friend/GetFriendListV1Controller.php @@ -56,7 +56,8 @@ class GetFriendListV1Controller extends BaseController ->field(['wa1.nickname','wa1.avatar','wa1.alias','wf.id','wf.wechatId','wa2.nickname as ownerNickname','wa2.alias as ownerAlias','wa2.wechatId as ownerWechatId','wf.createTime']) ->Join('wechat_account wa1','wf.wechatId = wa1.wechatId') ->Join('wechat_account wa2','wf.ownerWechatId = wa2.wechatId') - ->join('device_wechat_login dw','wa2.wechatId = dw.wechatId AND alive = 1') + ->join('device_wechat_login dw','wa2.wechatId = dw.wechatId AND alive = 1 AND dw.companyId = '.$this->getUserInfo('companyId')) + ->join('device d','dw.deviceId = d.id AND d.deleteTime = 0 AND d.companyId = '.$this->getUserInfo('companyId')) ->where($where); $total = $data->count(); @@ -71,6 +72,7 @@ class GetFriendListV1Controller extends BaseController 'data' => [ 'list' => $list, 'total' => $total, + 'companyId' => $this->getUserInfo('companyId') ] ]); } catch (\Exception $e) {