房源样本bug修改
This commit is contained in:
@@ -149,9 +149,9 @@
|
||||
<th style="width:50px;">面积</th>
|
||||
<th style="width:50px;">单价</th>
|
||||
<th style="width:60px;">总价</th>
|
||||
<th style="width:90px;"><#if sort?? && sort == 'p_date_desc'><a href="../seawater/houseList?cityDisplay=${cityDisplay!}®ion=${region!}&districtName=${districtName!}&sort=p_date_asc&cat=${cat!}&&rootName=${rootName!}&startDate=${startDate!}&endDate=${endDate!}">发布时间</a>↓
|
||||
<#elseif sort?? && sort == 'p_date_asc'><a href="../seawater/houseList?cityDisplay=${cityDisplay!}®ion=${region!}&districtName=${districtName!}&sort=p_date_desc&cat=${cat!}&&rootName=${rootName!}&startDate=${startDate!}&endDate=${endDate!}">发布时间</a>↑
|
||||
<#else><a href="../seawater/houseList?cityDisplay=${cityDisplay!}®ion=${region!}&districtName=${districtName!}&sort=p_date_asc&cat=${cat!}&rootName=${rootName!}&startDate=${startDate!}&endDate=${endDate!}">发布时间</a>↓</#if>
|
||||
<th style="width:90px;"><#if sort?? && sort == 'p_date_desc'><a href="../seawater/houseList?cityDisplay=${cityDisplay!}®ion=${region!}&districtName=${districtName!}&sort=p_date_asc&cat=${cat!}&&rootName=${rootName!}&startDate=${startDate!}&endDate=${endDate!}&room=${room!}&status=${status!}&estateType=${estateType!}&startArea${startArea!}&endArea=${endArea!}&startPrice=${startPrice!}&endPrice=${endPrice!}">发布时间</a>↓
|
||||
<#elseif sort?? && sort == 'p_date_asc'><a href="../seawater/houseList?cityDisplay=${cityDisplay!}®ion=${region!}&districtName=${districtName!}&sort=p_date_desc&cat=${cat!}&&rootName=${rootName!}&startDate=${startDate!}&endDate=${endDate!}&room=${room!}&status=${status!}&estateType=${estateType!}&startArea${startArea!}&endArea=${endArea!}&startPrice=${startPrice!}&endPrice=${endPrice!}">发布时间</a>↑
|
||||
<#else><a href="../seawater/houseList?cityDisplay=${cityDisplay!}®ion=${region!}&districtName=${districtName!}&sort=p_date_asc&cat=${cat!}&rootName=${rootName!}&startDate=${startDate!}&endDate=${endDate!}&room=${room!}&status=${status!}&estateType=${estateType!}&startArea${startArea!}&endArea=${endArea!}&startPrice=${startPrice!}&endPrice=${endPrice!}">发布时间</a>↓</#if>
|
||||
</th>
|
||||
<th style="width:50px;">室厅卫</th>
|
||||
<th style="width:50px;">楼层</th>
|
||||
|
||||
+17
-10
@@ -12,6 +12,7 @@ import com.fangjia.dal.seawater.model.Seawater;
|
||||
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
import org.sothis.core.util.Pager;
|
||||
|
||||
public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> implements SeawaterDao {
|
||||
|
||||
@@ -33,8 +34,10 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
||||
SeawaterQuery query = new SeawaterQuery();
|
||||
query.setId(id);
|
||||
query.setTable(table);
|
||||
query.getPager().setStartRow(-1);
|
||||
query.getPager().setPageSize(-1);
|
||||
Pager pager = new Pager();
|
||||
pager.setStartRow(-1);
|
||||
pager.setPageSize(-1);
|
||||
query.setPager(pager);
|
||||
List<JSONObject> jsonList = queryList(query);
|
||||
if(jsonList == null){
|
||||
return null;
|
||||
@@ -66,8 +69,10 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
||||
query.setRoom(room);
|
||||
query.setRootName(root);
|
||||
query.setOrder(order);
|
||||
query.getPager().setStartRow(-1);
|
||||
query.getPager().setPageSize(-1);
|
||||
Pager pager = new Pager();
|
||||
pager.setStartRow(start);
|
||||
pager.setPageSize(limit);
|
||||
query.setPager(pager);
|
||||
query.setTable(table);
|
||||
List<JSONObject> jsonList = queryList(query);
|
||||
if(jsonList == null){
|
||||
@@ -80,7 +85,7 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
||||
|
||||
@Override
|
||||
public List<Seawater> findSeawatersByQuery(SeawaterQuery query){
|
||||
List<Seawater> seawaterList= new ArrayList<Seawater>();
|
||||
List<Seawater> seawaterList;
|
||||
List<JSONObject> jsonList = queryList(query);
|
||||
if(jsonList == null){
|
||||
return null;
|
||||
@@ -190,7 +195,7 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
||||
reqBody.put("script", script);
|
||||
|
||||
try {
|
||||
request.postWithBody("http://es.fangjia.com:9200/seawater/_update_by_query", reqBody, this.buildHeader(), "UTF-8");
|
||||
request.postWithBody("http://es.fangjia.com:9200/seawater/_update_by_query?conflicts=proceed&wait_for_completion=false", reqBody, this.buildHeader(), "UTF-8");
|
||||
} catch (HttpRequestException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -208,7 +213,7 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
||||
reqBody.put("script", script);
|
||||
|
||||
try {
|
||||
request.postWithBody("http://es.fangjia.com:9200/seawater/_update_by_query", reqBody, this.buildHeader(), "UTF-8");
|
||||
request.postWithBody("http://es.fangjia.com:9200/seawater/_update_by_query?conflicts=proceed&wait_for_completion=false", reqBody, this.buildHeader(), "UTF-8");
|
||||
} catch (HttpRequestException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -647,7 +652,7 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
||||
jsonOrder.put("order", "desc");
|
||||
}
|
||||
JSONObject jsonSort = new JSONObject();
|
||||
jsonSort.put(query.getOrder(), jsonOrder);
|
||||
jsonSort.put(query.getSortField(), jsonOrder);
|
||||
List<JSONObject> sortJsonList = new ArrayList<JSONObject>();
|
||||
sortJsonList.add(jsonSort);
|
||||
reqBody.put("sort", sortJsonList);
|
||||
@@ -733,8 +738,10 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
||||
query.setRoom(room);
|
||||
query.setRootName(root);
|
||||
query.setOrder(order);
|
||||
query.getPager().setStartRow(-1);
|
||||
query.getPager().setPageSize(-1);
|
||||
Pager pager = new Pager();
|
||||
pager.setStartRow(start);
|
||||
pager.setPageSize(limit);
|
||||
query.setPager(pager);
|
||||
query.setTable(table);
|
||||
JSONObject json = query(query);
|
||||
if(!json.containsKey("hits") || !json.getJSONObject("hits").containsKey("total")){
|
||||
|
||||
Reference in New Issue
Block a user