Merge branch 'open_v2' into 'master'
修正无结果时空指针问题 See merge request !1165
This commit is contained in:
+10
-4
@@ -1688,7 +1688,7 @@ public class PropertyController {
|
||||
resultMap.put("avgPrice", Long.valueOf(json.getString("unitPrice")));
|
||||
resultMap.put("totalPrice", Long.valueOf(json.getString("totalPrice")));
|
||||
|
||||
if (apiUser.getId() == 1007497) {
|
||||
if (apiUser.getId() == 1007839) {
|
||||
int round = DataUtil.generateRandomNumber(model.getCity() + model.getAddress());
|
||||
Long newAvgPrice = (Long) (json.getLong("unitPrice") + json.getLong("unitPrice") * round / 100);
|
||||
resultMap.put("avgPrice", newAvgPrice);
|
||||
@@ -1708,9 +1708,15 @@ public class PropertyController {
|
||||
}
|
||||
return mav;
|
||||
}
|
||||
model.setDistrict(district.getRegion());
|
||||
model.setName(district.getName());
|
||||
return this.evaluateAction(model, request);
|
||||
if(district!=null){
|
||||
model.setDistrict(district.getRegion());
|
||||
model.setName(district.getName());
|
||||
return this.evaluateAction(model, request);
|
||||
}else{
|
||||
mav.setModel(BasicModel.buildBadRequestModel("该地址不支持估价!"));
|
||||
return mav;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Object evaluate2Action(PropertyEvaluationModel model, HttpServletRequest request)
|
||||
|
||||
Reference in New Issue
Block a user