/** * 通过小区id获取对应的板块ID * @param $comm_id * @param $prop_id * @param int $type * @return int */ public static function get_subregion_id($comm_id, $prop_id, $type = 2) { //所有的版块ID均使用area标中的ajk_id $ajk_subregion_id = 0; if ($comm_id) { $dao_ajk_comm = new Dao_Comm_AjkCommunity(); $row = $dao_ajk_comm->ajk_community_info($comm_id); $subregion_id = isset($row['community']['blockinfo']['ID']) ? intval($row['community']['blockinfo']['ID']) : 0; } else { $row = self::get_prop($prop_id); $subregion_id = isset($row['blockid']) ? intval($row['blockid']) : 0; } if ($subregion_id) { $daoArea = new Dao_Area_HzArea(); $r = $daoArea->get_area_byid($subregion_id); $ajk_subregion_id = isset($r['AJK_ID']) ? intval($r['AJK_ID']) : 0; } return $ajk_subregion_id; }
/** * 更新二手房小区表areacode * * @param $commId * @param $newAreacode * @param $updateTime * @return bool */ public function updateCommunityAreacodeInfo($commId, $newAreacode, $updateTime) { $dao = new Dao_Comm_AjkCommunity(); $result = $dao->updateCommunityAreacodeInfo($commId, $newAreacode, $updateTime); if ($result && !isset($result[-9999])) { return true; } else { return false; } }