/** * 获取房源的定价计划ID * * @param int $brokerId * @param int $houseId * @param int $cityId * @return int */ public static function getPlanIdByHouseId($brokerId, $houseId, $cityId) { $fixPlanRelation = Model_Plan_EsfPropFixedPlanRelation::getRelationByHouseId($houseId, $brokerId, $cityId); if (empty($fixPlanRelation)) { return 0; } return $fixPlanRelation['planId']; }
/** * 获取经纪人推广中的房源 * * @param int $brokerId * @param int $cityId * @param int $planId * @return array */ public static function getPropFixedPlanRelation($brokerId, $cityId, $planId) { return Model_Plan_EsfPropFixedPlanRelation::getPropFixedPlanRelation($brokerId, $cityId, $planId); }
/** * 获取定价推广中的房源 * * @param int $cityId * @param int $brokerId * @return array */ public static function getFixSpreadHouse($cityId, $brokerId) { $fixPlan = Model_Plan_EsfFixedPlan::getValidPlan($brokerId); if (empty($fixPlan)) { return array(); } $planId = $fixPlan['id']; $fixPlanRelationList = Model_Plan_EsfPropFixedPlanRelation::getPropFixedPlanRelation($brokerId, $cityId, $planId); $houseIds = array(); foreach ($fixPlanRelationList as $fixPlanRelation) { $houseIds[] = $fixPlanRelation['propId']; } return $houseIds; }