Exemplo n.º 1
0
 public function handle_request_internal()
 {
     //根据安居客经纪人ID获取好租经纪人ID
     $brokerId_hz = Bll_HzBroker::get_brokerid_by_ajk_brokerid($this->_params['brokerId']);
     if ($brokerId_hz) {
         $broker_info = Dao_Broker_HzPlan::get_hzbroker_info($brokerId_hz);
         if (!Bll_City::isBidCity($broker_info['cityid'])) {
             $error_code = Const_HzErrorInfo::NOBIDCITY;
             return array('status' => 'error', 'errcode' => $error_code, 'message' => Bll_HzFixPlan::get_message_from_code($error_code));
         }
     }
     $ret = Bll_HzBidPlan::prop_into_bid($brokerId_hz, $this->_params['cityId'], $this->_params['propId'], $this->_params['offer'], $this->_params['budget']);
     $r = array();
     if ($ret['status']) {
         $r = array('status' => 'ok', 'data' => array());
     } else {
         return Util_MobileAPI::error(Const_APIStatus::E_PLAN_PARAM_ERR);
     }
     return $r;
 }
Exemplo n.º 2
0
 public function handle_request_internal()
 {
     //根据安居客经纪人ID获取好租经纪人ID
     $brokerId_hz = Bll_HzBroker::get_brokerid_by_ajk_brokerid($this->_params['brokerId']);
     $proid = $this->_params['propId'];
     $cityId = $this->_params['cityId'];
     if (!Bll_City::isBidCity($cityId)) {
         $error_code = Const_HzErrorInfo::NOBIDCITY;
         return array('status' => 'error', 'errcode' => $error_code, 'message' => Bll_HzFixPlan::get_message_from_code($error_code));
     }
     $offer = $this->_params['offer'];
     //offer竞价出价
     $budget = $this->_params['budget'];
     //amount竞价预算(冻结金额)
     $ret = Bll_HzBidPlan::prop_into_bid($brokerId_hz, $cityId, $proid, $offer, $budget, $this->_params['brokerId']);
     $r = array();
     if ($ret['status']) {
         $r = array('status' => 'ok', 'data' => array());
     } else {
         $r = array('status' => 'error', 'errcode' => $ret['msg'], 'message' => Bll_HzFixPlan::get_message_from_code($ret['msg']));
     }
     return $r;
 }