12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?php
- namespace App\Services\Complain;
- use App\Http\Controllers\Miniprogram\Core;
- use App\Models\ComplaintModel;
- use App\Models\User\UserModel;
- use App\Services\Log\NoticeLogService;
- use App\Services\NoticeService\Channels\WeChatTemplateChannel;
- use App\Services\QQMiniApp\Template;
- use PocketBE\MsyPush\Jobs\RegistEventJob;
- class NoticeService
- {
- /**
- * 回复举报者
- * @param ComplaintModel $complaint
- */
- public function reply(ComplaintModel $complaint)
- {
- $to_uid = $complaint->uid;
- $user = UserModel::find($to_uid);
- $payload = [
- 'to_user' => $user->getAuth(),
- 'complaint' => $complaint->toArray(),
- 'meta' => [
- 'date' => date('Y-m-d'),
- ],
- ];
- dispatch(new RegistEventJob(10501, $payload))->onQueue("{push}");
- }
- /**
- * 拉黑被举报者通知
- * @param ComplaintModel $complaint
- */
- public function defriendNoticeBeuser(ComplaintModel $complaint)
- {
- $to_uid = $complaint->be_uid;
- $user = UserModel::find($to_uid);
- $payload = [
- 'to_user' => $user->getAuth(),
- 'complaint' => $complaint->toArray(),
- 'meta' => [
- 'date' => date('Y-m-d'),
- ],
- ];
- dispatch(new RegistEventJob(10502, $payload))->onQueue("{push}");
- }
- /**
- * 拉黑通知举报者
- * @param ComplaintModel $complaint
- */
- public function defriendNotice(ComplaintModel $complaint)
- {
- $to_uid = $complaint->uid;
- $user = UserModel::find($to_uid);
- $payload = [
- 'to_user' => $user->getAuth(),
- 'complaint' => $complaint->toArray(),
- 'meta' => [
- 'date' => date('Y-m-d'),
- ],
- ];
- dispatch(new RegistEventJob(10503, $payload))->onQueue("{push}");
- }
- /**
- * 举报-删除被举报者字段通知
- * @param ComplaintModel $complaint
- */
- public function erasingNotice(ComplaintModel $complaint)
- {
- $to_uid = $complaint->be_uid;
- $user = UserModel::find($to_uid);
- $payload = [
- 'to_user' => $user->getAuth(),
- 'complaint' => $complaint->toArray(),
- 'meta' => [
- 'date' => date('Y-m-d'),
- ],
- ];
- dispatch(new RegistEventJob(10504, $payload))->onQueue("{push}");
- }
- }
|