Ejemplo n.º 1
0
 public function handle_request()
 {
     $this->flagContent = $this->getFlag();
     $this->cursor = $this->flagContent['cursor'];
     $maxRow = Model_House_UpDown_Task::GetLastRow($this->date);
     $maxId = $maxRow['id'];
     if ($maxId < $this->cursor) {
         //当凌晨时有可能出现$this->cursor为昨天的数据
         $this->cursor = 0;
     }
     $increaseNum = $maxId - $this->cursor;
     $this->setFlag(array('cursor' => $maxId));
     $curlParam = array('tid' => 13349, 'dt' => date('Y-m-d H:i'), 'data' => $increaseNum);
     $re = $this->writeToUpDownKnowing($curlParam);
     if (!$re || $re['status'] != 'ok') {
         echo '处理失败';
     }
 }