优化代码
parent
4d9f71ac61
commit
3d22010bec
|
@ -63,6 +63,7 @@ class GroupService extends BaseService
|
||||||
*/
|
*/
|
||||||
public function create(int $user_id, array $group_info, $friend_ids = [])
|
public function create(int $user_id, array $group_info, $friend_ids = [])
|
||||||
{
|
{
|
||||||
|
$invite_ids = implode(',', $friend_ids);
|
||||||
$friend_ids[] = $user_id;
|
$friend_ids[] = $user_id;
|
||||||
$groupMember = [];
|
$groupMember = [];
|
||||||
$chatList = [];
|
$chatList = [];
|
||||||
|
@ -123,7 +124,7 @@ class GroupService extends BaseService
|
||||||
'record_id' => $result->id,
|
'record_id' => $result->id,
|
||||||
'type' => 1,
|
'type' => 1,
|
||||||
'operate_user_id' => $user_id,
|
'operate_user_id' => $user_id,
|
||||||
'user_ids' => implode(',', $friend_ids)
|
'user_ids' => $invite_ids
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Db::commit();
|
Db::commit();
|
||||||
|
|
Loading…
Reference in New Issue