新增租金查看
This commit is contained in:
+1
-1
@@ -1042,7 +1042,7 @@ public class EvaluationServiceImpl implements EvaluationService {
|
||||
|
||||
evaluation.setTotalPrice(((Number) (totalPrice)).intValue());
|
||||
|
||||
evaluation.setEvaluateWay(sqmetreRent.getSampleEnum());
|
||||
evaluation.setEvaluateWay(sqmetreRent.getValueType());
|
||||
evaluation.setCredit(sqmetreRent.getCredit());
|
||||
}else{
|
||||
evaluation.setTotalPrice(null);
|
||||
|
||||
+2
@@ -4,6 +4,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.fangjia.dal.common.DistrictKey;
|
||||
import com.fangjia.dal.mongo.model.SqmetreRent;
|
||||
|
||||
public interface SqmetreRentService {
|
||||
@@ -28,4 +29,5 @@ public interface SqmetreRentService {
|
||||
|
||||
SqmetreRent findNearestSqmetreRent(String city, String region, String name, String cat);
|
||||
|
||||
List<SqmetreRent> findAllAvgPriceByKeys(DistrictKey districtKey, String cat);
|
||||
}
|
||||
|
||||
+18
-2
@@ -5,6 +5,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.fangjia.dal.common.DistrictKey;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.http.impl.cookie.DateUtils;
|
||||
|
||||
@@ -216,6 +217,21 @@ public class SqmetreRentServiceImpl implements SqmetreRentService{
|
||||
}
|
||||
return sqmetreRent;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public List<SqmetreRent> findAllAvgPriceByKeys(DistrictKey key, String cat) {
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
params.add(new QueryParam("city", key.getCity()));
|
||||
if (StringUtils.isNotBlank(key.getRegion())) {
|
||||
params.add(new QueryParam("region", key.getRegion()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(key.getName())) {
|
||||
params.add(new QueryParam("districtName", key.getName()));
|
||||
}
|
||||
params.add(new QueryParam("cat", cat));
|
||||
List<SortParam> sortParams = new ArrayList<SortParam>();
|
||||
sortParams.add(new SortParam("weekend", true));
|
||||
return sqmetreRentDao.findAllByParams(params, sortParams,0,Integer.MAX_VALUE,
|
||||
new String[]{"weekend", "credit", "cat", "avgPrice", "calcAvgPrice"});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user