From 7cd9cc73b6bbae05e8fa734e29f6cd435e2599ba Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期三, 28 六月 2023 14:27:20 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

---
 springboot/src/main/java/com/java110/boot/smo/GetCommunityStoreInfoSMOImpl.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/springboot/src/main/java/com/java110/boot/smo/GetCommunityStoreInfoSMOImpl.java b/springboot/src/main/java/com/java110/boot/smo/GetCommunityStoreInfoSMOImpl.java
index 4ea4e38..0f07b93 100644
--- a/springboot/src/main/java/com/java110/boot/smo/GetCommunityStoreInfoSMOImpl.java
+++ b/springboot/src/main/java/com/java110/boot/smo/GetCommunityStoreInfoSMOImpl.java
@@ -8,6 +8,7 @@
 import com.java110.utils.cache.MappingCache;
 import com.java110.utils.constant.MappingConstant;
 import com.java110.utils.util.Assert;
+import com.java110.utils.util.StringUtil;
 import com.java110.vo.ResultVo;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.http.HttpMethod;
@@ -32,6 +33,17 @@
         if (responseEntity.getStatusCode() != HttpStatus.OK) {
             throw new IllegalArgumentException(responseEntity.getBody());
         }
+
+        if(!StringUtil.isJsonObject(responseEntity.getBody())){
+            //return new ResultVo(responseEntity.getStatusCode() == HttpStatus.OK ? ResultVo.CODE_OK : ResultVo.CODE_ERROR, responseEntity.getBody());
+            throw new IllegalArgumentException(responseEntity.getBody());
+        }
+
+        JSONObject paramJson = JSONObject.parseObject(responseEntity.getBody());
+        if(paramJson.containsKey("code") && paramJson.getIntValue("code") != 0){
+            throw new IllegalArgumentException(paramJson.getString("msg"));
+        }
+
         return new ResultVo(responseEntity.getStatusCode() == HttpStatus.OK ? ResultVo.CODE_OK : ResultVo.CODE_ERROR, responseEntity.getBody());
     }
 

--
Gitblit v1.8.0