예제 #1
0
 /**
  * admin_recovery method
  *
  * @return void
  */
 public function admin_recovery()
 {
     $this->set('title_for_layout', '月一バッチリカバリ');
     if ($this->request->is(array('post'))) {
         App::import('Console/Command', 'AppShell');
         App::import('Console/Command', 'PointHistoryMonthlyShell');
         $job = new PointHistoryMonthlyShell();
         $job->dispatchMethod('main', array(true));
     }
     $pointCaculateCalendar = $this->PointCaculateCalendar->find('first', array('recursive' => -1, 'conditions' => array('delete_flag' => 0), 'fields' => array('id', 'date', 'time', 'batch_time'), 'order' => array('id' => 'DESC')));
     $this->set(compact('pointCaculateCalendar'));
 }
 /**
  * admin_recovery method
  *
  * @return void
  */
 public function admin_recovery($id = null)
 {
     $this->set('title_for_layout', '月一バッチリカバリ');
     $this->autoRender = false;
     App::import('Console/Command', 'AppShell');
     App::import('Console/Command', 'PointHistoryMonthlyShell');
     $job = new PointHistoryMonthlyShell();
     $job->dispatchMethod('main', array(true, $id));
     $this->redirect(array('action' => 'index', '?' => $this->request->query));
 }