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'); }
public function update_order() { plan::get_instance()->expired_plan(); //过期自动返还 //北单自动兑奖 $bjdc_obj = Plans_bjdcService::get_instance(); $results = $bjdc_obj->get_unpaijiang_id(); if (empty($results)) { return; } foreach ($results as $row) { $bjdc_obj->bonus_plan($row); } }
public function update_plan_match_result() { $obj = Plans_bjdcService::get_instance(); $obj->get_plans_result(); }
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; } }