Beispiel #1
0
 public function actionRun()
 {
     $info = ReportAnalyseFiles::find()->where(['status' => -1])->orderBy(['id' => SORT_ASC])->one();
     if (!$info) {
         return $this->echoLog("no data need to handle");
     }
     $ret = false;
     switch ($info['action']) {
         case 1:
             $ret = $this->handleKeyword($info);
             break;
     }
     $info->status = $ret ? 1 : 0;
     $info->updated_time = date("Y-m-d H:i:s");
     $info->update(0);
     return $this->echoLog("it's over");
 }
Beispiel #2
0
 protected function checkHasFileByDate($type, $date)
 {
     $has_get = ReportAnalyseFiles::find()->where(['type' => $type, 'date' => $date])->count();
     return $has_get ? true : false;
 }