示例#1
0
 public function handle_request_internal()
 {
     $ajkBrokerId = $this->_params['brokerId'];
     $propId = $this->_params['propId'];
     //通过房源获取计划
     $objPlan = Model_Plan_HzPlanning::getBidRelationsByHouseIds($propId);
     $objPlan = array_shift($objPlan);
     //获取IP
     $ip = $this->_request->get_client_ip();
     //停止精选计划
     if ($objPlan->is_valid == Const_HzPlan::SPREAD) {
         $rs = Bll_Plan_Bid_HzBid::stopChoicePlan($ajkBrokerId, $objPlan->plan_id, $ip);
     } elseif ($objPlan->is_valid == Const_HzPlan::WAITING) {
         $rs = Bll_Plan_Bid_HzBid::stopChoiceQueue($ajkBrokerId, $objPlan->plan_id, $ip);
     } else {
         $rs['status'] = 'error';
         $rs['msg'] = '计划状态错误!';
     }
     if ($rs['status'] != 'ok') {
         return array('status' => Const_APIStatus::RETURN_CODE_ERROR, 'errcode' => Const_APIStatus::E_SYS_ERR, 'message' => $rs['msg']);
     }
     return array('status' => Const_APIStatus::RETURN_CODE_OK, 'data' => array('msg' => '精选结束成功'));
 }
示例#2
0
 /**
  * 放弃排队
  *
  * @param array $params
  * @return array
  */
 private function do_hz_stop_queue($params)
 {
     if (!isset($params['planid']) || empty($params['planid'])) {
         return array('status' => 'error', 'msg' => '计划不存在。');
     }
     $request = APF::get_instance()->get_request();
     $ip = $request->get_client_ip();
     $ajkBrokerId = $request->getBrokerId();
     return Bll_Plan_Bid_HzBid::stopChoiceQueue($ajkBrokerId, $params['planid'], $ip);
 }