Browse Source

客户群群发选择群主调整

houxiaohua 1 week ago
parent
commit
bc6afe5d60
1 changed files with 3 additions and 1 deletions
  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;