This commit is contained in:
Hankin 2026-04-15 10:06:50 +08:00
parent 06b9078eac
commit 9e1fd31e2c
2 changed files with 9 additions and 4 deletions

View File

@ -96,6 +96,10 @@ class OfflineOrderController extends Controller
// $group->autoCreateChat($offline_order->order_id); // $group->autoCreateChat($offline_order->order_id);
//区分群聊 //区分群聊
if ($request->service_type == 1) { // DMA群聊 if ($request->service_type == 1) { // DMA群聊
//创建群记录
$chat_id = $data['chat_id'] ?? null;
Group::create(['name' => $offline_order->name . '服务群', 'order_id' => $offline_order->order_id, 'chat_id' => $chat_id]);
$this->offlineOrderService->insertRoleData($chat_id, $offline_order->order_id);
$group = new Group(); $group = new Group();
$group_name = $offline_order->name . "服务群"; $group_name = $offline_order->name . "服务群";
$announcement = "😊 本群是您的专属健康服务群 $announcement = "😊 本群是您的专属健康服务群
@ -105,6 +109,10 @@ class OfflineOrderController extends Controller
【请勿讨论政治、宗教或发广告】"; 【请勿讨论政治、宗教或发广告】";
$group->autoCreateChatV2($offline_order->order_id, $group_name, $request->service_type, $announcement); $group->autoCreateChatV2($offline_order->order_id, $group_name, $request->service_type, $announcement);
} else if ($request->service_type == 3) { //MINI DMA群聊 } else if ($request->service_type == 3) { //MINI DMA群聊
//创建群记录
$chat_id = $data['chat_id'] ?? null;
Group::create(['name' => $offline_order->name . '服务群', 'order_id' => $offline_order->order_id, 'chat_id' => $chat_id]);
$this->offlineOrderService->insertRoleData($chat_id, $offline_order->order_id);
$group = new Group(); $group = new Group();
$group_name = $offline_order->name . "服务群【Mini版】"; $group_name = $offline_order->name . "服务群【Mini版】";
$announcement = "【友福同享】欢迎加入DMA服务群【Mini版】! $announcement = "【友福同享】欢迎加入DMA服务群【Mini版】!

View File

@ -79,9 +79,7 @@ class OfflineOrderService
"operate_user_name" => auth()->user()->name, "operate_user_name" => auth()->user()->name,
]); ]);
//创建群记录
$chat_id = $data['chat_id'] ?? null;
Group::create(['name' => $order->name . '服务群', 'order_id' => $order->id, 'chat_id' => $chat_id]);
if (config('app.env') == 'production') { if (config('app.env') == 'production') {
//生成用户绑定二维码 //生成用户绑定二维码
@ -93,7 +91,6 @@ class OfflineOrderService
$offline_order->save(); $offline_order->save();
} }
$this->insertRoleData($chat_id, $order->id);
DB::commit(); DB::commit();
return $offline_order; return $offline_order;