去打折逻辑
This commit is contained in:
+14
-14
@@ -116,12 +116,12 @@ public class CommercialController {
|
||||
if(mav.model()!=null){
|
||||
return mav;
|
||||
}
|
||||
Double ratio = getUserPriceRatio(request);
|
||||
Double ratio = null;//getUserPriceRatio(request);
|
||||
JSONObject json = locationEvaluateApi(model, AvmUrls.SHOPSELL_EVALUATE);
|
||||
if (json != null) {
|
||||
|
||||
if (json.containsKey("msg") && "成功".equals(json.getString("msg"))) {
|
||||
if (json.containsKey("unitPrice") && json.containsKey("lng")) {
|
||||
if (json.containsKey("unitPrice") && json.containsKey("location")) {
|
||||
|
||||
if(json.get("unitPrice") != null){
|
||||
int unitPrice = (Integer) json.get("unitPrice");
|
||||
@@ -138,8 +138,9 @@ public class CommercialController {
|
||||
model.setMaxPrice(model.getMaxPrice());
|
||||
}
|
||||
}
|
||||
Double lng = json.getDouble("lng");
|
||||
Double lat = json.getDouble("lat");
|
||||
JSONObject locObj = json.getJSONObject("location");
|
||||
Double lng = locObj.getDouble("lon");
|
||||
Double lat = locObj.getDouble("lat");
|
||||
List<DealSample> houseSelf = dealSampleService.querySampleByLocation(lng, lat, model.getMinPrice(), model.getMaxPrice(), "shop_sell", 5);
|
||||
List<BusinessCaseDto> dtos = createSample(houseSelf, "sell", ratio, lng, lat);
|
||||
mav.setModel(BasicModel.buildOKModel().setResult(dtos));
|
||||
@@ -147,10 +148,9 @@ public class CommercialController {
|
||||
BasicModel.markNoDataRequest();
|
||||
}
|
||||
}
|
||||
} else{
|
||||
mav.setModel(BasicModel.buildOKModel().setResult(null));
|
||||
}
|
||||
// else{
|
||||
// mav.setModel(BasicModel.buildServerErrorModel().setMsg(json.getString("msg")));
|
||||
// }
|
||||
} else {
|
||||
mav.setModel(BasicModel.buildServerErrorModel().setMsg("服务升级中..."));
|
||||
}
|
||||
@@ -363,11 +363,11 @@ public class CommercialController {
|
||||
if(mav.model()!=null){
|
||||
return mav;
|
||||
}
|
||||
Double ratio = getUserPriceRatio(request);
|
||||
Double ratio = null;//getUserPriceRatio(request);
|
||||
JSONObject json = locationEvaluateApi(model, AvmUrls.SHOPRENT_EVALUATE);
|
||||
if (json != null) {
|
||||
if (json.containsKey("msg") && "成功".equals(json.getString("msg"))) {
|
||||
if (json.containsKey("unitPrice") && json.containsKey("lng")) {
|
||||
if (json.containsKey("unitPrice") && json.containsKey("location")) {
|
||||
|
||||
Double minPrice = null;
|
||||
Double maxPrice = null;
|
||||
@@ -384,8 +384,9 @@ public class CommercialController {
|
||||
minPrice = model.getMaxPrice().doubleValue();
|
||||
}
|
||||
}
|
||||
Double lng = json.getDouble("lng");
|
||||
Double lat = json.getDouble("lat");
|
||||
JSONObject locObj = json.getJSONObject("location");
|
||||
Double lng = locObj.getDouble("lon");
|
||||
Double lat = locObj.getDouble("lat");
|
||||
List<DealSample> houseSelf = dealSampleService.querySampleByLocation(lng, lat, DataUtil.getDoubleRound(2, minPrice), DataUtil.getDoubleRound(2, maxPrice), "shop_rent", 5);
|
||||
List<BusinessCaseDto> dtos = createSample(houseSelf, "rent", ratio, lng, lat);
|
||||
|
||||
@@ -395,10 +396,9 @@ public class CommercialController {
|
||||
BasicModel.markNoDataRequest();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
mav.setModel(BasicModel.buildOKModel().setResult(null));
|
||||
}
|
||||
// else {
|
||||
// mav.setModel(BasicModel.buildServerErrorModel().setMsg(json.getString("msg")));
|
||||
// }
|
||||
} else {
|
||||
mav.setModel(BasicModel.buildServerErrorModel().setMsg("服务升级中..."));
|
||||
}
|
||||
|
||||
+1
-1
@@ -815,7 +815,7 @@ public class OfficeController {
|
||||
}
|
||||
/* 先到CPDB库中查找写字楼 */
|
||||
District district = null;
|
||||
Double ratio = getUserPriceRatio(request);
|
||||
Double ratio = null;//getUserPriceRatio(request);
|
||||
|
||||
if(StringUtils.isNotBlank(model.getDistrict()) && StringUtils.isNotBlank(model.getName())) {
|
||||
district = districtService.findByNameAndAlias(model.getCity(), model.getDistrict(), model.getName(), "office");
|
||||
|
||||
+1
-1
@@ -546,7 +546,7 @@ public class OfficeSellController {
|
||||
return mav;
|
||||
}
|
||||
|
||||
Double ratio = getUserPriceRatio(request);
|
||||
Double ratio = null;//getUserPriceRatio(request);
|
||||
/* 先到CPDB库中查找写字楼 */
|
||||
District district = null;
|
||||
|
||||
|
||||
+1
-1
@@ -6659,7 +6659,7 @@ public class PropertyController {
|
||||
} else {
|
||||
pager.setPageSize(5);
|
||||
}
|
||||
Double ratio = getUserPriceRatio(request);
|
||||
Double ratio = null;//getUserPriceRatio(request);
|
||||
Double minPrice = null;
|
||||
Double maxPrice = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user