瀏覽代碼

客户群群发选择群主调整

houxiaohua 2 月之前
父節點
當前提交
bc6afe5d60
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/Service/ChatGroup/ChatGroupService.php

+ 3 - 1
app/Service/ChatGroup/ChatGroupService.php

@@ -271,7 +271,9 @@ class ChatGroupService
271 271
             if(empty($accountList)) return [];
272 272
 
273 273
             $corpidList = $accountList->pluck('corpid');
274
-            $ownerList = ChatGroup::select('corpid', 'owner')->whereIn('corpid', $corpidList)->where('status', 1)->get();
274
+            $ownerList = ChatGroup::select('corpid', 'owner')->whereIn('corpid', $corpidList)->where('status', 1)
275
+                ->groupBy(['corpid', 'owner'])
276
+                ->get();
275 277
             $data = [];
276 278
             foreach ($accountList as $account) {
277 279
                 $corpid = $account->corpid;