This commit is contained in:
Hankin 2026-04-15 09:49:53 +08:00
parent 08495d956d
commit 62246bac32
2 changed files with 7 additions and 3 deletions

View File

@ -192,7 +192,11 @@ class OfflineOrderController extends Controller
$group = new Group(); $group = new Group();
$chatName = $offline_order->name . "双证咨询服务群"; $chatName = $offline_order->name . "双证咨询服务群";
$group->autoCreateCertChat($order->user_id, $chatName); $orderId = 0;
if ($offline_order->price == 5800) {
$orderId = $order->id;
}
$group->autoCreateCertChat($order->user_id, $chatName, $orderId);
return; return;
} }

View File

@ -178,7 +178,7 @@ class Group extends BaseModel
DB::commit(); DB::commit();
return; return;
} }
public function autoCreateCertChat(int $userId, string $chatName) public function autoCreateCertChat(int $userId, string $chatName, $orderId = 0)
{ {
$icon = "https://images.health.ufutx.com/202411/15/2d117497b649f659d103069e10a785b9.jpeg"; $icon = "https://images.health.ufutx.com/202411/15/2d117497b649f659d103069e10a785b9.jpeg";
DB::beginTransaction(); DB::beginTransaction();
@ -217,7 +217,7 @@ class Group extends BaseModel
//创建群 //创建群
$map = []; $map = [];
$map['name'] = $chatName; $map['name'] = $chatName;
$map['order_id'] = 0; $map['order_id'] = $orderId;
$map['avatar'] = $icon; $map['avatar'] = $icon;
$map['intro'] = $options['intro']; $map['intro'] = $options['intro'];
$map["announcement"] = $options['announcement']; $map["announcement"] = $options['announcement'];