cert group
This commit is contained in:
parent
7c9ac20e9f
commit
08495d956d
@ -115,27 +115,28 @@ 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 == 2) { // 双证群
|
} else if ($request->service_type == 2) { // 双证群
|
||||||
$group_name = $offline_order->name . "双证咨询服务群";
|
// $group_name = $offline_order->name . "双证咨询服务群";
|
||||||
$announcement = "😊 本群是您的双证咨询服务群
|
// $announcement = "😊 本群是您的双证咨询服务群
|
||||||
|
|
||||||
👏 让我们一起携手创造快乐温馨的学习氛围,祝福您在此有一个美好的健康生活之旅
|
// 👏 让我们一起携手创造快乐温馨的学习氛围,祝福您在此有一个美好的健康生活之旅
|
||||||
|
|
||||||
【请勿讨论政治、宗教或发广告】";
|
// 【请勿讨论政治、宗教或发广告】";
|
||||||
$group->autoCreateChatV2($offline_order->order_id, $group_name, $request->service_type, $announcement);
|
// $group->autoCreateChatV2($offline_order->order_id, $group_name, $request->service_type, $announcement);
|
||||||
|
|
||||||
|
// 创建双证群
|
||||||
|
$this->createCertGroup($offline_order);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否自动拉人入群
|
if ($request->service_type == 1 || $request->service_type == 3) {
|
||||||
$group = Group::where("order_id", $offline_order->order_id)->first();
|
// 是否自动拉人入群
|
||||||
if ($request->auth_join) {
|
$group = Group::where("order_id", $offline_order->order_id)->first();
|
||||||
$offlineService = new OfflineOrderService();
|
if ($request->auth_join && $request->service_type != 2) {
|
||||||
$offlineService->AutoServiceJoinGroup($group->im_chat_id, $group->id, $group->order_id, $user_id);
|
$offlineService = new OfflineOrderService();
|
||||||
DmaProcessLog::addUserProcessLog($user_id, $offline_order->order_id ?? 0, 1, "add_server_to_group", "行政已拉服务人员入群(自动分配)", auth()->user()->id, 4);
|
$offlineService->AutoServiceJoinGroup($group->im_chat_id, $group->id, $group->order_id, $user_id);
|
||||||
}
|
DmaProcessLog::addUserProcessLog($user_id, $offline_order->order_id ?? 0, 1, "add_server_to_group", "行政已拉服务人员入群(自动分配)", auth()->user()->id, 4);
|
||||||
|
}
|
||||||
// 缴费后自动发送线上
|
// 缴费后自动发送线上
|
||||||
if (isset($data["check_pay_status"]) && $data["check_pay_status"] == 1) {
|
if (isset($data["check_pay_status"]) && $data["check_pay_status"] == 1) {
|
||||||
if ($request->service_type == 1) {
|
|
||||||
$owner_accid_id = make_wangyiyun_accid($group->owner_id);
|
$owner_accid_id = make_wangyiyun_accid($group->owner_id);
|
||||||
$ope = \App\Services\ChatService::MSG_GROUP_OPE;
|
$ope = \App\Services\ChatService::MSG_GROUP_OPE;
|
||||||
// 自动标记线上合同并且发送合同信息
|
// 自动标记线上合同并且发送合同信息
|
||||||
@ -149,23 +150,24 @@ class OfflineOrderController extends Controller
|
|||||||
ChatService::sendImMessage($owner_accid_id, $ope, $group->im_chat_id, $type, $body);
|
ChatService::sendImMessage($owner_accid_id, $ope, $group->im_chat_id, $type, $body);
|
||||||
|
|
||||||
// 确认已缴费流程
|
// 确认已缴费流程
|
||||||
if ($request->service_type == 1 || $request->service_type == 3) {
|
DmaProcessLog::addUserProcessLog($user_id, $offline_order->order_id ?? 0, 1, "admin_check_pay_status", "行政确认用户已缴费", auth()->user()->id, 4);
|
||||||
DmaProcessLog::addUserProcessLog($user_id, $offline_order->order_id ?? 0, 1, "admin_check_pay_status", "行政确认用户已缴费", auth()->user()->id, 4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
// 创建双证群
|
||||||
|
$this->createCertGroup($offline_order);
|
||||||
|
//操作记录
|
||||||
|
OperationLoggedEvent::dispatch("创建了虚拟订单: $offline_order->id ,主订单为 $offline_order->order_id");
|
||||||
|
DmaProcessLog::addUserProcessLog($user_id, $offline_order->order_id ?? 0, 1, "create_group", "已自动建立群聊", auth()->user()->id, 4);
|
||||||
|
DmaProcessLog::addUserProcessLog($user_id, $offline_order->order_id ?? 0, 1, "send_group_notice", "系统已发送群公告", auth()->user()->id, 4);
|
||||||
|
|
||||||
|
// 待办事项
|
||||||
|
$theme = "请确认用户[" . $offline_order->name . "]需签署的合同类型(线上/线下)";
|
||||||
|
TaskService::AddTask(0, 0, $theme, [8]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建双证群
|
|
||||||
$this->createCertGroup($offline_order);
|
|
||||||
//操作记录
|
|
||||||
OperationLoggedEvent::dispatch("创建了虚拟订单: $offline_order->id ,主订单为 $offline_order->order_id");
|
|
||||||
DmaProcessLog::addUserProcessLog($user_id, $offline_order->order_id ?? 0, 1, "create_group", "已自动建立群聊", auth()->user()->id, 4);
|
|
||||||
DmaProcessLog::addUserProcessLog($user_id, $offline_order->order_id ?? 0, 1, "send_group_notice", "系统已发送群公告", auth()->user()->id, 4);
|
|
||||||
|
|
||||||
// 待办事项
|
|
||||||
$theme = "请确认用户[" . $offline_order->name . "]需签署的合同类型(线上/线下)";
|
|
||||||
TaskService::AddTask(0, 0, $theme, [8]);
|
|
||||||
return $this->success('ok');
|
return $this->success('ok');
|
||||||
} catch (\Exception | ValidationException $e) {
|
} catch (\Exception | ValidationException $e) {
|
||||||
return $this->jsonResponse(1, $e->getMessage());
|
return $this->jsonResponse(1, $e->getMessage());
|
||||||
@ -180,7 +182,7 @@ class OfflineOrderController extends Controller
|
|||||||
public function createCertGroup($offline_order)
|
public function createCertGroup($offline_order)
|
||||||
{
|
{
|
||||||
// 35600订单可创建双证群
|
// 35600订单可创建双证群
|
||||||
$priceList = [25800, 36500];
|
$priceList = [25800, 36500, 5800];
|
||||||
if (!in_array($offline_order->price, $priceList))
|
if (!in_array($offline_order->price, $priceList))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@ -114,24 +114,20 @@ class Group extends BaseModel
|
|||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
$order = Order::where('id', $order_id)->first();
|
$order = Order::where('id', $order_id)->first();
|
||||||
//生成规则都是一样的,这里就不查数据库了
|
//生成规则都是一样的,这里就不查数据库了
|
||||||
if ($service_type == 2) {
|
|
||||||
$owner_id = 15536; // 群主 小福同学
|
|
||||||
$customer = 1620; // 客服 海静
|
|
||||||
$members = [$customer, $order->user_id];
|
|
||||||
} else {
|
|
||||||
$owner_id = 8;
|
|
||||||
if (config('app.env') == "production") {
|
|
||||||
$owner_id = 3675;
|
|
||||||
}
|
|
||||||
|
|
||||||
$members = [7];
|
$owner_id = 8;
|
||||||
if (config('app.env') == "production") {
|
if (config('app.env') == "production") {
|
||||||
$members = [1080];
|
$owner_id = 3675;
|
||||||
}
|
|
||||||
if ($order->user_id > 0) {
|
|
||||||
$members = array_merge($members, [$order->user_id]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$members = [7];
|
||||||
|
if (config('app.env') == "production") {
|
||||||
|
$members = [1080];
|
||||||
|
}
|
||||||
|
if ($order->user_id > 0) {
|
||||||
|
$members = array_merge($members, [$order->user_id]);
|
||||||
|
}
|
||||||
|
|
||||||
$owner_ac_cid = make_wangyiyun_accid($owner_id);
|
$owner_ac_cid = make_wangyiyun_accid($owner_id);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user