예제 #1
0
 public function __construct()
 {
     parent::__construct();
     $this->job = Auto_order_job_Model::get_instance();
     $this->log = Auto_order_log_Model::get_instance();
     //$this->plan = Auto_order_plan_Model::get_instance();
     $this->plans_basic_obj = Plans_basicService::get_instance();
     $this->jczq_obj = Plans_jczqService::get_instance();
     $this->jclq_obj = Plans_jclqService::get_instance();
     $this->sfc_obj = Plans_sfcService::get_instance();
     $this->bjdc_obj = Plans_bjdcService::get_instance();
     $this->errorDesc = Kohana::config('errorcode.error');
 }
예제 #2
0
 public function check_bonus()
 {
     @set_time_limit(300);
     $obj = ORM::factory('match_data')->where('status', 2);
     $results = $obj->find_all();
     $jczq_obj = Plans_jczqService::get_instance();
     $sfc_obj = Plans_sfcService::get_instance();
     foreach ($results as $row) {
         $data = array();
         switch ($row['ticket_type']) {
             case 1:
                 $data = $jczq_obj->check_bonus($row);
                 break;
             case 2:
                 $data = $sfc_obj->check_bonus($row);
                 break;
             case 3:
                 //$data =
                 break;
             case 4:
                 //$data =
                 break;
         }
         if (!empty($data)) {
             if ($data['status'] == 1) {
                 //更新彩票状态
                 $this->update_ticket($row['id'], $data['bonus']);
             }
         }
     }
 }
예제 #3
0
파일: plan.php 프로젝트: RenzcPHP/3dproduct
 public function bonus_plan($ordernum)
 {
     $result = Plans_basicService::get_instance()->get_by_ordernum($ordernum);
     if (empty($result)) {
         return FALSE;
     }
     if ($result['status'] != 4) {
         return FALSE;
     }
     switch ($result['ticket_type']) {
         case 1:
             //$flag = Plans_jczqService::get_instance()->bonus_plan($result['order_num']);
             $flag = Plans_jczqService::get_instance()->bonus_plan_virtual($result['order_num']);
             break;
         case 2:
             $flag = Plans_sfcService::get_instance()->bonus_plan($result['order_num']);
             break;
         case 6:
             $flag = Plans_jclqService::get_instance()->bonus_plan($result['order_num']);
             break;
         case 7:
             $flag = Plans_bjdcService::get_instance()->bonus_plan($result['order_num']);
             break;
     }
 }