zm
2021-03-25 d84ff6053b22269a6c59dc005e9efb8de6595988
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/**
 * Created by PhpStorm
 * User: 风哀伤
 * Date: 2021/1/14
 * Time: 10:11 上午
 * @copyright: ©2020 浙江禾匠信息科技
 * @link: http://www.zjhejiang.com
 */
 
namespace app\jobs;
 
use app\forms\common\message\MessageService;
use app\models\Mall;
use yii\queue\JobInterface;
 
class MessageServiceJob extends BaseJob implements JobInterface
{
    /**
     * @var MessageService $messageService
     */
    public $messageService;
 
    /**
     * @var Mall $mall
     */
    public $mall;
 
    public $appPlatform;
 
    public function execute($queue)
    {
        $this->setRequest();
        $mall = Mall::findOne($this->mall->id);
        \Yii::$app->setMall($mall);
        \Yii::$app->setAppPlatform($this->appPlatform);
        $this->messageService->job();
    }
}