示例#1
0
 public function actionMonth()
 {
     $m = new MonthLogic();
     $m->reset();
     $m->go(2);
     return $this->render('test');
 }
示例#2
0
 public function updateTheMonth($id, $tip = true)
 {
     if ($this->updating > 0) {
         if ($tip) {
             \yii::$app->session->setFlash('success', "还有数据尚未更新完成,请稍后");
         }
     } else {
         $model = self::findOne($id);
         $model->setScenario('updating');
         $model->status = $model->time;
         $model->update();
         $m = new MonthLogic();
         $m->reset();
     }
 }