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