加入隐藏链接
This commit is contained in:
+122
-17
@@ -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<District> result;
|
||||
// DistrictQueryBean queryBean = modelToBean(model);
|
||||
// queryBean.setCity(city);
|
||||
//
|
||||
// // 老网站的URL中区域是带“区”的
|
||||
// if (StringUtils.isNotBlank(queryBean.getRegion())) {
|
||||
// List<Group> gList = menu.getGroupList();
|
||||
// for (Group g : gList) {
|
||||
// if (!"region".equals(g.getName())) {
|
||||
// continue;
|
||||
// }
|
||||
//
|
||||
// List<Item> 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<DistrictInfo> districtList = districtService.processDistrictInfo(result.getEntityResults(), model.getKeyword());
|
||||
// model.setDistrictList(districtList);
|
||||
// if (StringUtils.isNotBlank(model.getKeyword()) && districtList.size() <= 3) {
|
||||
// Map<String, Object> parseMap = knowbaseService.parseKeyword(model.getKeyword());
|
||||
// if (parseMap.get("district_name") != null) {
|
||||
// List<DistrictInfo> 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<QueryParam> params = new ArrayList<QueryParam>();
|
||||
params.add(new QueryParam("visible", 0));
|
||||
params.add(new QueryParam("city", model.getCityName()));
|
||||
params.add(new QueryParam("category", "district"));
|
||||
List<District> 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<String> getSubList(List<String> fullList, int start, int pageSize, int total) {
|
||||
if (start >= total) {
|
||||
return Collections.emptyList();
|
||||
|
||||
@@ -1,21 +1,125 @@
|
||||
<#ftl attributes={"content_type":"text/html; charset=UTF-8"}>
|
||||
<#compress>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../jsconstants.ftl" />
|
||||
<link rel="stylesheet" type="text/css" href="${staticUrl}/style/fangjia/fj_district_list.css?v=${version}" />
|
||||
<link rel="stylesheet" type="text/css" href="${staticUrl}/style/fangjia/base.css?v=${version}" />
|
||||
<link rel="stylesheet" type="text/css" href="${staticUrl}/style/fangjia/fj_friend_link.css?v=${version}" />
|
||||
</head>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
<#list districts! as dist>
|
||||
<a href="${cityUrl}/zoushi?cityName=${dist.city}&districtName=${dist.name!''}®ion=${dist.region!''}">${dist.name!}</a>
|
||||
</#list>
|
||||
</div><!--end mainwrap-->
|
||||
<#include "/analytics.ftl" />
|
||||
</body>
|
||||
</html>
|
||||
<#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>
|
||||
|
||||
<#if keyword?exists && keyword != ''>
|
||||
<#assign keywords="${keywords}${keyword}">
|
||||
<#assign descr="${descr!''}${keyword!''}">
|
||||
<#assign title="${title!''}${keyword!''}">
|
||||
<#assign addedKeywords="true">
|
||||
</#if>
|
||||
|
||||
<#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">
|
||||
</#if>
|
||||
|
||||
<#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}附近小区房价">
|
||||
</#if>
|
||||
</#list>
|
||||
<#else>
|
||||
<#assign title2="${cityName}小区信息">
|
||||
</#if>
|
||||
|
||||
<#assign PAGE_TITLE>【${title2}】</#assign>
|
||||
<#assign PAGE_DESCRIPTION>${title2!''}小区搜索, 房价网同时提供${cityName!''}小区房价,小区在售二手房房源,新房房源,租房房源.以及小区配套设施,小区相关新闻等内容.</#assign>
|
||||
<#assign PAGE_KEYWORDS>${keywords!''},房价网</#assign>
|
||||
<#assign GA_PAGEVIEW_PATH = "/district/list/${fullQueryString}" />
|
||||
<#include "/header/head.ftl" />
|
||||
<link rel="stylesheet" type="text/css" href="${staticUrl}/style/fangjia/fj_district_list.css?v=${version}" />
|
||||
<link rel="stylesheet" type="text/css" href="${staticUrl}/style/fangjia/base.css?v=${version}" />
|
||||
<link rel="stylesheet" type="text/css" href="${staticUrl}/style/fangjia/fj_friend_link.css?v=${version}" />
|
||||
<link rel="stylesheet" type="text/css" href="${staticUrl}/style/fangjia/fj_global.css?v=${version}" />
|
||||
<link rel="stylesheet" type="text/css" href="${staticUrl}/style/fangjia/fj_pager.css?v=${version}" />
|
||||
|
||||
<link href="${staticUrl}/style/fangjia/v6/common.css?v=${version}" rel="stylesheet">
|
||||
<link href="${staticUrl}/style/fangjia/v6/_city_select.css?v=${version}" rel="stylesheet">
|
||||
<link href="${staticUrl}/style/fangjia/v6/trend.css?v=${version}" rel="stylesheet">
|
||||
<script src="${staticUrl}/js/fangjia/v5/jquery-1.7.2.min.js?v=${version}"></script>
|
||||
<link href="${staticUrl}/style/fangjia/v6/seoInfo.css?v=${version}" rel="stylesheet">
|
||||
<#include "../jsconstants.ftl" />
|
||||
<style type="text/css">
|
||||
.pageleft2 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
margin-top: 80px;
|
||||
}
|
||||
.hover_list ul li {
|
||||
height: 54px;
|
||||
}
|
||||
|
||||
.pagination-page, .pageNumber {
|
||||
border: solid 0px #dadada;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<#include "/header/v6/_header.ftl"/>
|
||||
<div class="pageleft2">
|
||||
<#if pager.totalRows gt 0>
|
||||
<div class="c0 pt5 search_result" id="pagelist">
|
||||
<@d_pager action="hidelist" currentPage=pager.currentPage controller="district" totalPages=pager.totalPages theme="topSearch" anchor="pagelist"/>
|
||||
</div>
|
||||
|
||||
<div class="hover_list">
|
||||
<ul>
|
||||
<#list districtList as district>
|
||||
<li name="__page_click_area" id="detail_${district_index}" class="hover_m">
|
||||
<b>
|
||||
<a href="<@d_url uri="/zoushi"><@d_param name="keyword" value="${district.districtNameText!}"/><@d_param name="cityName" value="${cityName!}"/></@d_url>">
|
||||
<h2>${district.districtNameText}</h2>
|
||||
</a>
|
||||
</b>
|
||||
|
||||
</li>
|
||||
</#list>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="c0 mb20 page" style="height: 60px;">
|
||||
<#if pager.totalRows gt pager.pageSize>
|
||||
<div class="fr h30">
|
||||
<@d_pager action="hidelist" currentPage=pager.currentPage controller="district" totalPages=pager.totalPages anchor="pagelist"/>
|
||||
</div>
|
||||
</#if>
|
||||
</div>
|
||||
</#if>
|
||||
</div><!--end pageleft2-->
|
||||
|
||||
</div><!--end main-->
|
||||
</div><!--end mainwrap-->
|
||||
<script type="text/javascript" src="${staticUrl}/js/fangjia/fangjia.list.js?v=${version}"></script>
|
||||
</body>
|
||||
</html>
|
||||
</#compress>
|
||||
@@ -965,7 +965,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<a href="${cityUrl}/district/hidelist" style="display: none;"></a>
|
||||
|
||||
|
||||
<#include "/header/v6/_footer.ftl"/>
|
||||
|
||||
Reference in New Issue
Block a user