Beispiel #1
0
 public function handle_request_internal()
 {
     $ajkBrokerId = $this->_params['brokerId'];
     $propIds = $this->_params['propIds'];
     $arrPropId = explode(',', $propIds);
     $plans = Model_Plan_HzPlanning::getBidRelationsByHouseIds($arrPropId);
     $arrPlanId = array();
     foreach ($plans as $plan) {
         $arrPlanId[] = $plan->plan_id;
     }
     //删除已停止的精选计划
     //全部失败则返回调用失败,
     //只要有一个成功,则接口返回成功
     $flag = 0;
     foreach ($arrPlanId as $planId) {
         $rs = Bll_Plan_Bid_HzBid::deleteChoicePlan($ajkBrokerId, $planId);
         if ($rs['status'] == 'ok') {
             $flag = 1;
         }
     }
     if ($flag == 1) {
         return array('status' => Const_APIStatus::RETURN_CODE_OK, 'data' => array());
     } else {
         return array('status' => Const_APIStatus::RETURN_CODE_ERROR, 'errcode' => Const_APIStatus::E_SYS_ERR, 'message' => '删除失败!');
     }
 }
Beispiel #2
0
 /**
  * 删除计划
  *
  * @param $params
  * @return array
  */
 private function do_hz_delete_plan($params)
 {
     if (!isset($params['planid']) || empty($params['planid'])) {
         return array('status' => 'error', 'msg' => '计划不存在。');
     }
     $request = APF::get_instance()->get_request();
     $cityId = $request->getBrokerCityId();
     $ajkBrokerId = $request->getBrokerId();
     return Bll_Plan_Bid_HzBid::deleteChoicePlan($ajkBrokerId, $params['planid']);
 }