From 4a22379aa8c82b18573a51d7d2842947c0e71441 Mon Sep 17 00:00:00 2001 From: xhxu Date: Mon, 22 Mar 2021 18:28:18 +0800 Subject: [PATCH] rent --- .../service/impl/WxRentContractServiceImpl.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index d0eb970db..8f95d741b 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -1229,9 +1229,10 @@ public class WxRentContractServiceImpl implements WxRentContractService { a = new BigDecimal(rentPrice1).divide(new BigDecimal(100)); } String otherRentPriceInfo1 = wxRentContract.getOtherRentPriceInfo(); - logger.info("why----error---"+otherRentPriceInfo1); if(StringUtils.isNotBlank(otherRentPriceInfo1)){ -// JSONObject jsonObject = new JSONObject(otherRentPriceInfo1); + if(otherRentPriceInfo1.startsWith("\"")){ + otherRentPriceInfo1 = otherRentPriceInfo1.substring(1,otherRentPriceInfo1.length()-1); + } JSONObject jsonObject = JSONObject.parseObject(otherRentPriceInfo1); String siteMoney1 = jsonObject.getString("siteMoney"); if(StringUtils.isNotBlank(siteMoney1)){ @@ -2710,4 +2711,12 @@ public class WxRentContractServiceImpl implements WxRentContractService { return exists; } + + public static void main(String[] args) { + String s = "{\"siteMoney\":\"2\",\"facilityMoney\":\"3\",\"administratorMoney\":\"4\"}"; + JSONObject jsonObject = JSONObject.parseObject(s); + String siteMoney = jsonObject.getString("siteMoney"); + System.out.println(siteMoney); + } + }