예제 #1
0
 /**
  * 精选计划停止推广
  */
 public function do_stop()
 {
     $planInfo = Model_Plan_EsfAjkPropSpread::getPlanInfoByIdEx($this->params['planId']);
     if (empty($planInfo)) {
         $this->outPut(0, '没有获取到计划信息');
     }
     if ($this->params['brokerId'] != $planInfo['brokerId']) {
         $this->outPut(0, '没有获取到计划信息(code:-2)');
     }
     if (Model_Plan_EsfAjkPropSpread::ONQUEUE == $planInfo['status']) {
         $result = Bll_Plan_Bid_EsfWebChoiceOperation::stop_queue($this->params['planId'], $planInfo['brokerId']);
     } elseif (Model_Plan_EsfAjkPropSpread::ONLINE == $planInfo['status']) {
         $result = Bll_Plan_Bid_EsfWebChoiceOperation::stop_plan($this->params['planId'], $planInfo['brokerId']);
     } else {
         $this->outPut(0, '无效的计划');
         return;
     }
     if ($result['status'] == 'ok') {
         $this->outPut(1, '计划取消推广成功');
     }
     $this->outPut(0, '计划取消推广失败');
 }
예제 #2
0
 /**
  * 删除计划
  */
 private function do_esf_delete_plan($params)
 {
     $planId = $params['planid'];
     $brokerId = APF::get_instance()->get_request()->getBrokerId();
     return Bll_Plan_Bid_EsfWebChoiceOperation::delete_plan($planId, $brokerId);
 }