Bladeren bron

客户群群发选择群主调整

houxiaohua 2 maanden geleden
bovenliggende
commit
bc6afe5d60
1 gewijzigde bestanden met toevoegingen van 3 en 1 verwijderingen
  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;