zm
2021-04-09 93652ca875fc904a25a7f214adc548745573950a
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: 2019/5/28
 * Time: 17:04
 * @copyright: ©2019 浙江禾匠信息科技
 * @link: http://www.zjhejiang.com
 */
 
namespace app\jobs;
 
 
use app\forms\mall\statistics\InitDataForm;
use app\models\Mall;
use yii\base\BaseObject;
use yii\queue\JobInterface;
 
class ChangeShareLevelJob extends BaseJob implements JobInterface
{
    public $mall;
 
    public function execute($queue)
    {
        $this->setRequest();
        $mall = Mall::findOne($this->mall->id);
        \Yii::$app->setMall($mall);
        \Yii::error('--我进来啦--');
        $t = \Yii::$app->db->beginTransaction();
        try {
            $form = new InitDataForm();
            $form->share();
            $t->commit();
        } catch (\Exception $exception) {
            $t->rollBack();
            \Yii::error($exception);
        }
    }
}