diff --git a/projects/fangjia-coresite/src/main/java/com/fangjia/coresite/controllers/DistrictController.java b/projects/fangjia-coresite/src/main/java/com/fangjia/coresite/controllers/DistrictController.java index 23728998e..0e25c9471 100644 --- a/projects/fangjia-coresite/src/main/java/com/fangjia/coresite/controllers/DistrictController.java +++ b/projects/fangjia-coresite/src/main/java/com/fangjia/coresite/controllers/DistrictController.java @@ -325,7 +325,85 @@ public class DistrictController { return model.redirectPermanently(model.getCityUrl() + "/ershoufang/" + URLEncoder.encode(model.getKeyword(), "UTF-8") + "--"); } - /*if (sensitiveWordService.isSensitiveWord(model.getKeyword())) { +// if (sensitiveWordService.isSensitiveWord(model.getKeyword())) { +// return model.redirectPermanently("http://www.fangjia.com"); +// } + +// Pager pager = model.getPager(20); +// pager.setMaxPage(FangjiaConfig.getConfig().getSearchListMaxPageNo()); +// +// // СÇøÁбí֧³ÖÐÂÅÌËÑË÷ +// model.setCategory("district"); +// Object obj = FangjiaRudder.listMan(model.getKeyword()); +// if (obj != null) { +// return obj; +// } +// +// String city = ((ServerArea) FangjiaServerAreaContextHolder.getServerAreaDefault()).getDisplay(); +// Menu menu = menuService.menuMaker(FangjiaServerAreaContextHolder.getServerAreaDefault(), MenuCategoryEnum.xiaoqu, +// getCurrentParams(), 1); +// model.setMenu(menu); +// +// FacetQueryResult result; +// DistrictQueryBean queryBean = modelToBean(model); +// queryBean.setCity(city); +// +// // ÀÏÍøվµÄURLÖÐÇøÓòÊǴø¡°Çø¡±µÄ +// if (StringUtils.isNotBlank(queryBean.getRegion())) { +// List gList = menu.getGroupList(); +// for (Group g : gList) { +// if (!"region".equals(g.getName())) { +// continue; +// } +// +// List iList = g.getItemList(); +// for (Item i : iList) { +// if (i.isSelected()) { +// queryBean.setRegion(i.getName()); +// break; +// } +// } +// break; +// } +// } +// +// if (StringUtils.isBlank(model.getKeyword())) { +// result = districtService.findByQueryBeanWithFacet(menu, pager, queryBean, "bscore", false, false); +// } else { +// result = districtService.findByQueryBeanWithFacet(menu, pager, queryBean, null, false, false); +// if (result.getNumberFound() <= 0) { +// result = districtService.findByQueryBeanWithFacet(menu, pager, queryBean, null, false, false, true); +// } +// } +// +// List districtList = districtService.processDistrictInfo(result.getEntityResults(), model.getKeyword()); +// model.setDistrictList(districtList); +// if (StringUtils.isNotBlank(model.getKeyword()) && districtList.size() <= 3) { +// Map parseMap = knowbaseService.parseKeyword(model.getKeyword()); +// if (parseMap.get("district_name") != null) { +// List otherDistrictList = otherCitiesDistrict(model.getKeyword(), model.getKeyword()); +// model.setOtherDistrictList(otherDistrictList); +// } +// } +// +// pager.setTotalRows(result.getNumberFound()); +// model.setPager(pager); +// +// model.setConditions(menuService.getConditions(((ServerArea) FangjiaServerAreaContextHolder.getServerAreaDefault()), +// MenuCategoryEnum.xiaoqu, getCurrentParams())); +// model.setConditionItems(menuService.getConditionItems(FangjiaServerAreaContextHolder.getServerAreaDefault(), +// MenuCategoryEnum.xiaoqu, getCurrentParams())); +// +//// */ +//// * gasmͳ¼Æ +//// */ +// model.addGaMap(Gakey.rc, pager.getTotalRows()); +// +// feedFooter(model); +// return model; + } + public Object hidelistAction(HttpServletRequest request,DistrictModel model) throws Exception { + if (sensitiveWordService.isSensitiveWord(model.getKeyword())) { return model.redirectPermanently("http://www.fangjia.com"); } @@ -394,26 +472,12 @@ public class DistrictController { model.setConditionItems(menuService.getConditionItems(FangjiaServerAreaContextHolder.getServerAreaDefault(), MenuCategoryEnum.xiaoqu, getCurrentParams())); - *//** - * gasmͳ¼Æ - *//* + model.addGaMap(Gakey.rc, pager.getTotalRows()); feedFooter(model); - return model;*/ - } - public Object hidelistAction(HttpServletRequest request,DistrictModel model) throws Exception { - if(StringUtils.isNotBlank(model.getCityName())){ - List params = new ArrayList(); - params.add(new QueryParam("visible", 0)); - params.add(new QueryParam("city", model.getCityName())); - params.add(new QueryParam("category", "district")); - List districts = districtService.findAllByParams(params, 0, 0,new String[]{"city", "region", "name"}); - model.setDistricts(districts); - CacheUtils.putValue(CacheUtils.CachePolicyEnum.NEXT_MONTH, this.getClass(), "district-hide-list-crawl-"+model.getCityName(), (Serializable) districts); - } - return model; + } /** @@ -1764,6 +1828,47 @@ public class DistrictController { // return model; } + + /** + * СÇøÐÅϢ + * + * @param model + * @return + */ + @SuppressWarnings("unchecked") + public Object seoInfoAction(DistrictModel model) { + + District district = districtService.findDistrictById(model.getId()); + if (district == null) + return model; + + model.setCityName(district.getCity()); + model.setDistrictName(district.getName()); + model.setDistrictAddress(district.getAddress()); + model.setRegion(district.getRegion()); + model.setId(district.getId()); + model.setType(String.valueOf(model.getType())); + + + DistrictStatBo districtStatBo = districtStatService.findDistrictStat(new DistrictKey(district.getCity(), district.getRegion(), district.getName())); + if (null == districtStatBo || null == districtStatBo.getDefaultDistrictStat()) { + return model; + } + + int districtAvgPrice = 0; + int villaAvgPrice = 0; + if (null != districtStatBo.getDistrictStat()) { + districtAvgPrice = districtStatBo.getDistrictStat().getAvgPrice(); + } + if (null != districtStatBo.getVillaDistrictStat()) { + villaAvgPrice = districtStatBo.getVillaDistrictStat().getAvgPrice(); + } + model.setDistrictAvgPrice((Integer) (districtAvgPrice / 100) * 100); + model.setVillaAvgPrice((Integer) (villaAvgPrice / 100) * 100); + model.setDistrictStatBo(districtStatBo); + return model; + } + private List getSubList(List fullList, int start, int pageSize, int total) { if (start >= total) { return Collections.emptyList(); diff --git a/projects/fangjia-coresite/src/main/java/com/fangjia/coresite/model/DistrictModel.java b/projects/fangjia-coresite/src/main/java/com/fangjia/coresite/model/DistrictModel.java index 5ac69e8ef..2e5f579d3 100644 --- a/projects/fangjia-coresite/src/main/java/com/fangjia/coresite/model/DistrictModel.java +++ b/projects/fangjia-coresite/src/main/java/com/fangjia/coresite/model/DistrictModel.java @@ -140,6 +140,8 @@ public class DistrictModel extends BaseModel { private int allPicCount; private List districts; + private String type; + public boolean isHousePriceInfo() { return housePriceInfo; } @@ -787,4 +789,12 @@ public class DistrictModel extends BaseModel { public void setDistricts(List districts) { this.districts = districts; } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } } diff --git a/projects/fangjia-coresite/src/main/webapp/district/hidelist.ftl b/projects/fangjia-coresite/src/main/webapp/district/hidelist.ftl index 9963b48ae..7c88e857e 100644 --- a/projects/fangjia-coresite/src/main/webapp/district/hidelist.ftl +++ b/projects/fangjia-coresite/src/main/webapp/district/hidelist.ftl @@ -1,21 +1,130 @@ <#ftl attributes={"content_type":"text/html; charset=UTF-8"}> <#compress> - - - - <#include "../jsconstants.ftl" /> - - - - + + + - -
- <#list districts! as dist> - ${dist.name!} - -
-<#include "/analytics.ftl" /> - - + <#assign fangjiaShareContent = "房价网: 提供${cityName!}小区房价及在售房源,还有小区周边配套及新闻评论!" /> + <#assign title="${cityName}"> + <#assign keywords="${cityName}"> + <#assign descr="${cityName}房价网为您提供热门小区搜索服务"> + <#assign addedKeywords="false"> + + <#if region?exists && region != ''> + <#assign keywords="${keywords}${region}"> + <#assign descr="${descr!''}${region!''}"> + <#assign title="${title!''}${region!''}"> + <#assign addedKeywords="true"> + + + <#if keyword?exists && keyword != ''> + <#assign keywords="${keywords}${keyword}"> + <#assign descr="${descr!''}${keyword!''}"> + <#assign title="${title!''}${keyword!''}"> + <#assign addedKeywords="true"> + + + <#assign title="${title}"> + <#assign keywords="${keywords}小区,热门小区搜索"> + <#assign descr="${descr}二手房"> + + <#if block?exists && block != ''> + <#assign title="${title!''}${block!''}板块"> + <#assign keywords="${keywords!''}${block!''}板块"> + <#assign descr="${descr!''}${block!''}板块"> + <#assign addedKeywords="true"> + + + <#assign title2="${cityName}小区信息"> + <#if (conditions?? && conditions?size gt 0)> + <#list conditions as c> + <#assign title2="${title2}${c}"> + <#if c_has_next> + <#assign title2="${title2}_"> + <#else> + <#assign title2="${title2}附近小区房价"> + + + <#else> + <#assign title2="${cityName}小区信息"> + + + <#assign PAGE_TITLE>【${title2}】 + <#assign PAGE_DESCRIPTION>${title2!''}小区搜索, 房价网同时提供${cityName!''}小区房价,小区在售二手房房源,新房房源,租房房源.以及小区配套设施,小区相关新闻等内容. + <#assign PAGE_KEYWORDS>${keywords!''},房价网 + <#assign GA_PAGEVIEW_PATH = "/district/list/${fullQueryString}" /> + <#include "/header/head.ftl" /> + + + + + + + + + + + + <#include "../jsconstants.ftl" /> + + + + + <#include "/header/v6/_header.ftl"/> +
+
+ <#if pager.totalRows gt 0> +
+ <@d_pager action="hidelist" currentPage=pager.currentPage controller="district" totalPages=pager.totalPages theme="topSearch" anchor="pagelist"/> +
+ + + +
+ <#if pager.totalRows gt pager.pageSize> +
+ <@d_pager action="hidelist" currentPage=pager.currentPage controller="district" totalPages=pager.totalPages anchor="pagelist"/> +
+ +
+ +
+ +
+ + + + + \ No newline at end of file diff --git a/projects/fangjia-coresite/src/main/webapp/district/seoInfo.ftl b/projects/fangjia-coresite/src/main/webapp/district/seoInfo.ftl new file mode 100644 index 000000000..076a12008 --- /dev/null +++ b/projects/fangjia-coresite/src/main/webapp/district/seoInfo.ftl @@ -0,0 +1,111 @@ + +<#compress> + + + + <#include "../jsconstants.ftl" /> + + + + + + + + + + + + + + + + +<#include "/header/v6/_header.ftl"/> + + +
+
+
+
+
+

+

${city!} ${region!} ${districtAddress!}

+
+
+
  • 小区均价
  • 56565元/㎡
+
  • 环比
  • 3.6
+
  • 同比
  • 12.3
+
+
+ + <#include "../houseReport/district_price.ftl"/> + + + <#include "../houseReport/district_around_map2.ftl"/> +
+
+
+<#include "/header/v6/_footer.ftl"/> + + + +<#----> +<#----> + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/fangjia-coresite/src/main/webapp/houseReport/district_around_map2.ftl b/projects/fangjia-coresite/src/main/webapp/houseReport/district_around_map2.ftl new file mode 100644 index 000000000..4b1b758da --- /dev/null +++ b/projects/fangjia-coresite/src/main/webapp/houseReport/district_around_map2.ftl @@ -0,0 +1,128 @@ + + + + + +
+
小区周边配套 +<#-- --> +
+
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/projects/fangjia-coresite/src/main/webapp/index.ftl b/projects/fangjia-coresite/src/main/webapp/index.ftl index 99dd2f6bd..356dea3ad 100644 --- a/projects/fangjia-coresite/src/main/webapp/index.ftl +++ b/projects/fangjia-coresite/src/main/webapp/index.ftl @@ -965,7 +965,7 @@ - + <#include "/header/v6/_footer.ftl"/> diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/NewGaoDePoiBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/NewGaoDePoiBatch.groovy index d65f086bf..29c5560d4 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/NewGaoDePoiBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/NewGaoDePoiBatch.groovy @@ -361,7 +361,7 @@ class NewGaoDePoiBatch extends BaseBatch{ // if(!cityObj.city.contains("¹Ìԭ")){ // continue // } - def fileName = "/home/goojia/gj/poi/old_poi/${cityObj.city}.csv" + def fileName = "/home/goojia/gj/poi/old_poi/merge_poi/${cityObj.city}.csv" if (CommonDatautils.isWindow()) { fileName = "D:\\Êý¾Ý\\merge_poi\\${cityObj.city}.csv" } @@ -439,12 +439,17 @@ class NewGaoDePoiBatch extends BaseBatch{ def esValue = regionMap.get(key) if(esValue.township && ret.township){ if(esValue.name.contains(ret.name) || ret.name.contains(esValue.name)){//|| - def distance = GeoUtils.calculateDistance(ret.location.lon, ret.location.lat, esValue.location.lon, esValue.location.lat); - if(distance <100){ - simlarObj = esValue - println esValue.name +" "+ret.name+" "+distance - break; + if(ret.location && ret.location.lon){ + def distance = GeoUtils.calculateDistance(ret.location.lon, ret.location.lat, esValue.location.lon, esValue.location.lat); + if(distance <100){ + simlarObj = esValue + println esValue.name +" "+ret.name+" "+distance + break; + } + }else{ + println ret.data_id +" Î޾­γ¶ÈÐÅϢ" } + } } } diff --git a/projects/fangjia-static/src/main/webapp/style/fangjia/v6/seoInfo.css b/projects/fangjia-static/src/main/webapp/style/fangjia/v6/seoInfo.css new file mode 100644 index 000000000..83c2d72fe --- /dev/null +++ b/projects/fangjia-static/src/main/webapp/style/fangjia/v6/seoInfo.css @@ -0,0 +1,37 @@ +@charset "utf-8"; +/* CSS Document */ +.main { width: 1200px;margin: auto; margin-top: 100px;overflow: hidden;position: relative;} +.main_left {margin: auto;} +.topic {padding: 40px 0;border-bottom: solid 1px #e5e5e5;} +.topic_top {font-size: 18px;margin-bottom: 20px;align-items: center;display: flex;float: left;} +.topic_top i {width: 30px;height: 36px;display: inline-flex;background: url(../../../images/fangjia/v6/4-2-13.png) no-repeat left bottom;margin-left: -10px;} +.overview01 .overview_left{margin-bottom: 80px;} +.overview01 .overview_left p { margin-bottom: 10px;width: 100%; text-align: justify;font-size: 20px;line-height: 30px;} +.overview01 .overview_left p label {color: #3c3f46;font-size: 24px;font-weight: 500;} +.overview01 .overview_left p i {width: 11px;height: 30px;background: url(../../../images/fangjia/v6/address.png) no-repeat center center;float: left;margin-right: 5px;} +.overview01 .overview_left p{font-size: 16px;} + +.price_div{display: flex;float: left;flex-direction: row;justify-content: flex-start;width: 1200px; margin: auto auto; padding-bottom: 10px;} +.price_div ul{width:25%;} +.price_div ul li{color: #878682;} +.price_div ul li .unit_price{color: #db4c3f;font-size: 32px;font-weight: bold;line-height: 50px;} +.price_div ul li .dw{color: #db4c3f;font-size: 16px;} +.price_div ul li .up{ color: #db4c3f;} +.price_div ul li .down{color:#00ae66;} +.price_div ul li .hb_tb{font-size: 22px;line-height: 50px;} +.price_div ul li .down i {background: url(../../../images/fangjia/v6/down.png) no-repeat left center;} +.price_div ul li .up i {background: url(../../../images/fangjia/v6/up.png) no-repeat left center;} + + +.districtMap{width:100%;height:400px;} +/* 地图样式 */ +.mark-icon-box .mark-icon {width: 20px;height: 30px;display: block;cursor: pointer;font-size: 14px;color: #fff;font-weight: bold;text-align: center;line-height: 24px;background: url(../../../images/fangjia/v5/dw.png) no-repeat;} +.mark-icon-box { width: 24px; height: 30px; position: absolute; z-index: 98; } +.mark-icon-box .mark-icon:hover, .mark-icon-box .mark-icon-h { background: url(../../../images/fangjia/v5/dw_h.png) no-repeat ; } + +.mark-tip {font-size: 14px;position: absolute;z-index: 99;margin-top: -74px;margin-left: -20px;} +.mark-tip .title1 {line-height: 20px;color: #000;background: #fff;padding: 5px 40px 5px 15px;border-radius: 5px;box-shadow: 3px 3px 8px #888;height: 20px;} +.mark-tip .title1 span {display: inline-block;max-width: 170px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;margin-right: 25px;} +.mark-tip .title1 b { font-weight: normal; display: block; position: absolute; top: 5px; right: 10px; } +.mark-tip .icon { width: 21px; height:14px; background: url(../../../images/fangjia/v5/sj.png) no-repeat ; position: absolute; bottom: -14px; left: 20px; } +