From 4ed693f48d1435de7a6333df17c2b34154731429 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期三, 05 七月 2023 22:26:27 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
---
service-api/src/main/java/com/java110/api/smo/GetCommunityStoreInfoSMOImpl.java | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/service-api/src/main/java/com/java110/api/smo/GetCommunityStoreInfoSMOImpl.java b/service-api/src/main/java/com/java110/api/smo/GetCommunityStoreInfoSMOImpl.java
index 99f3897..b5ad7f7 100644
--- a/service-api/src/main/java/com/java110/api/smo/GetCommunityStoreInfoSMOImpl.java
+++ b/service-api/src/main/java/com/java110/api/smo/GetCommunityStoreInfoSMOImpl.java
@@ -9,6 +9,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;
@@ -33,6 +34,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