/** * 精选计划停止推广 */ 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, '计划取消推广失败'); }
/** * 停止推广 */ private function do_esf_stop_plan($params) { if (!isset($params['planid']) || empty($params['planid'])) { return array('status' => 'error', 'msg' => '计划不存在。'); } $planId = $params['planid']; $brokerId = APF::get_instance()->get_request()->getBrokerId(); return Bll_Plan_Bid_EsfWebChoiceOperation::stop_plan($planId, $brokerId); }