class XxxPostContentVerifyBiz extends AbstractContentVerifyBiz { const NAME = 'XxxPost'; const TITLE = '内容发布审核'; public function name() { return self::NAME; } public function title() { return self::TITLE; } public function verifyCount() { return ModelUtil::count('post', ['status' => PostStatus::WAIT_VERIFY]); } public function verifyRule() { return '\\Module\\Xxx\\Admin\\Controller\\PostController@verifyList'; } }
在 ModuleServiceBiz 中注册内容审核提供者和通知提供者
// 注册内容审核提供者 ContentVerifyBiz::register(XxxPostContentVerifyBiz::class); // 注册通知的目的是为了发送通知链接 NotifierBiz::registerQuick(XxxPostContentVerifyBiz::NAME, XxxPostContentVerifyBiz::TITLE);
use Module\Vendor\Provider\ContentVerify\ContentVerifyJob; // 创建一个审核任务 ContentVerifyJob::create(XxxPostContentVerifyBiz::NAME, ['id' => $post['id']], $post['title']); // 创建一个审核任务提醒 ContentVerifyJob::createQuick(XxxPostContentVerifyBiz::NAME, $post['id'], $post['title']);
QQ扫一扫联系
点击联系
2374926113
微信扫一扫联系
.