Merge branch 'open_v2' into 'master'

慧合测试完毕,去掉测试代码

See merge request !1169
This commit is contained in:
2025-09-12 17:04:48 +08:00
@@ -1211,15 +1211,6 @@ public class PropertyController {
evaluation.setAvgPrice(avgPrice); evaluation.setAvgPrice(avgPrice);
evaluation.setBigTotalPrice((long) (avgPrice * evaluation.getArea())); evaluation.setBigTotalPrice((long) (avgPrice * evaluation.getArea()));
} }
if (StringUtils.isNotBlank(evaluation.getFromUserId())) {
// 1007839 广州市慧合信息科技有限公司 huihe_test 价格向上2%-10% 向下 2%-5%
if (evaluation.getFromUserId().equals("1007839")) {
int round = DataUtil.generateRandomNumber(district.getCity() + model.getAddress());
int newAvgPrice = (int) (evaluation.getAvgPrice() + evaluation.getAvgPrice() * round / 100);
evaluation.setAvgPrice(newAvgPrice);
evaluation.setBigTotalPrice((long) (newAvgPrice * evaluation.getArea()));
}
}
} }
} catch (Exception ex) { } catch (Exception ex) {
@@ -1661,16 +1652,15 @@ public class PropertyController {
} }
} }
ApiUser apiUser = checkNewAuthorized(model.getToken()); // ApiUser apiUser = checkNewAuthorized(model.getToken());
String userName = null; // String userName = null;
if (apiUser != null) { // if (apiUser != null) {
User user = userService.findById(apiUser.getId()); // User user = userService.findById(apiUser.getId());
if (user != null) { // if (user != null) {
userName = user.getUserName(); // userName = user.getUserName();
} // }
} // }
if (district == null) {
if (district == null && userName!=null && !userName.equals("huihe_test")) {
//加上高德获取经纬度 和 根据经纬度估值 //加上高德获取经纬度 和 根据经纬度估值
Map<String, String> map = GeoUtils.parserByGaode(model.getCity(), model.getAddress()); Map<String, String> map = GeoUtils.parserByGaode(model.getCity(), model.getAddress());
if(map != null && (!map.containsKey("lng") || map.containsKey("level") && !GAODE_LEVEL.contains(map.get("level")))){ if(map != null && (!map.containsKey("lng") || map.containsKey("level") && !GAODE_LEVEL.contains(map.get("level")))){
@@ -1690,15 +1680,6 @@ public class PropertyController {
HashMap<String, Long> resultMap = new HashMap<String, Long>(); HashMap<String, Long> resultMap = new HashMap<String, Long>();
resultMap.put("avgPrice", Long.valueOf(json.getString("unitPrice"))); resultMap.put("avgPrice", Long.valueOf(json.getString("unitPrice")));
resultMap.put("totalPrice", Long.valueOf(json.getString("totalPrice"))); resultMap.put("totalPrice", Long.valueOf(json.getString("totalPrice")));
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);
double totalPrice = newAvgPrice * model.getSize();
resultMap.put("totalPrice", (long) totalPrice);
}
mav.setModel(BasicModel.buildOKModel().setResult(resultMap)); mav.setModel(BasicModel.buildOKModel().setResult(resultMap));
} else { } else {
mav.setModel(BasicModel.buildBadRequestModel("该地址不支持估价!")); mav.setModel(BasicModel.buildBadRequestModel("该地址不支持估价!"));