1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-29 05:41:37 +08:00

精简代码

This commit is contained in:
xiaochong0302 2024-12-27 21:20:16 +08:00
parent 0757b0af8d
commit eb33d51d7c
8 changed files with 4 additions and 42 deletions

View File

@ -82,12 +82,7 @@ class ConsultReply extends LogicService
$task = new TaskModel();
$itemInfo = [
'consult' => ['id' => $consult->id],
];
$task->item_id = $consult->id;
$task->item_info = $itemInfo;
$task->item_type = TaskModel::TYPE_NOTICE_CONSULT_REPLY;
$task->priority = TaskModel::PRIORITY_LOW;
$task->status = TaskModel::STATUS_PENDING;

View File

@ -58,12 +58,7 @@ class ConsultCreate extends DingTalkNotice
$task = new TaskModel();
$itemInfo = [
'consult' => ['id' => $consult->id],
];
$task->item_id = $consult->id;
$task->item_info = $itemInfo;
$task->item_type = TaskModel::TYPE_STAFF_NOTICE_CONSULT_CREATE;
$task->priority = TaskModel::PRIORITY_LOW;
$task->status = TaskModel::STATUS_PENDING;
@ -71,4 +66,4 @@ class ConsultCreate extends DingTalkNotice
$task->create();
}
}
}

View File

@ -40,12 +40,7 @@ class PointGiftRedeem extends DingTalkNotice
$task = new TaskModel();
$itemInfo = [
'point_gift_redeem' => ['id' => $redeem->id],
];
$task->item_id = $redeem->id;
$task->item_info = $itemInfo;
$task->item_type = TaskModel::TYPE_STAFF_NOTICE_POINT_GIFT_REDEEM;
$task->priority = TaskModel::PRIORITY_MIDDLE;
$task->status = TaskModel::STATUS_PENDING;
@ -53,4 +48,4 @@ class PointGiftRedeem extends DingTalkNotice
$task->create();
}
}
}

View File

@ -42,12 +42,7 @@ class TeacherLive extends DingTalkNotice
$task = new TaskModel();
$itemInfo = [
'live' => ['id' => $live->id],
];
$task->item_id = $live->id;
$task->item_info = $itemInfo;
$task->item_type = TaskModel::TYPE_STAFF_NOTICE_TEACHER_LIVE;
$task->priority = TaskModel::PRIORITY_LOW;
$task->status = TaskModel::STATUS_PENDING;
@ -55,4 +50,4 @@ class TeacherLive extends DingTalkNotice
$task->create();
}
}
}

View File

@ -26,7 +26,7 @@ class LiveBegin extends LogicService
$smsNoticeEnabled = $this->smsNoticeEnabled();
$courseUser = $task->item_info['course_user'];
$chapterId = $task->item_info['chapter']['id'];
$chapterId = $task->item_id;
$courseRepo = new CourseRepo();
@ -84,9 +84,6 @@ class LiveBegin extends LogicService
'course_id' => $courseUser->course_id,
'user_id' => $courseUser->user_id,
],
'chapter' => [
'id' => $chapter->id,
],
];
$task->item_id = $chapter->id;

View File

@ -67,12 +67,7 @@ class OrderFinish extends LogicService
$task = new TaskModel();
$itemInfo = [
'order' => ['id' => $order->id],
];
$task->item_id = $order->id;
$task->item_info = $itemInfo;
$task->item_type = TaskModel::TYPE_NOTICE_ORDER_FINISH;
$task->priority = TaskModel::PRIORITY_HIGH;
$task->status = TaskModel::STATUS_PENDING;

View File

@ -63,12 +63,7 @@ class PointGoodsDeliver extends LogicService
$task = new TaskModel();
$itemInfo = [
'redeem' => ['id' => $redeem->id],
];
$task->item_id = $redeem->id;
$task->item_info = $itemInfo;
$task->item_type = TaskModel::TYPE_NOTICE_POINT_GOODS_DELIVER;
$task->priority = TaskModel::PRIORITY_MIDDLE;
$task->status = TaskModel::STATUS_PENDING;

View File

@ -67,12 +67,7 @@ class RefundFinish extends LogicService
$task = new TaskModel();
$itemInfo = [
'refund' => ['id' => $refund->id],
];
$task->item_id = $refund->id;
$task->item_info = $itemInfo;
$task->item_type = TaskModel::TYPE_NOTICE_REFUND_FINISH;
$task->priority = TaskModel::PRIORITY_MIDDLE;
$task->status = TaskModel::STATUS_PENDING;