From 0fea532b07be89978343cb4aede3693af99f5656 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期二, 25 七月 2023 23:04:41 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
---
service-api/src/main/java/com/java110/api/smo/GetCommunityStoreInfoSMOImpl.java | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 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 3de9cd6..f45f092 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
@@ -35,12 +35,13 @@
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());
+ 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){
+ if (paramJson.containsKey("code") && paramJson.getIntValue("code") != 0) {
throw new IllegalArgumentException(paramJson.getString("msg"));
}
@@ -63,10 +64,10 @@
throw new IllegalArgumentException(responseEntity.getBody());
}
JSONObject paramOut = JSONObject.parseObject(responseEntity.getBody());
- if(paramOut.containsKey("code") && ResultVo.CODE_OK != paramOut.getIntValue("code")){
+ if (paramOut.containsKey("code") && ResultVo.CODE_OK != paramOut.getIntValue("code")) {
throw new IllegalArgumentException(paramOut.getString("msg"));
}
- return new ResultVo(responseEntity.getStatusCode() == HttpStatus.OK ? ResultVo.CODE_OK : ResultVo.CODE_ERROR, responseEntity.getBody());
+ return new ResultVo(paramOut.getIntValue("code"), paramOut.getString("msg"), paramOut.get("data"));
}
@Override
@@ -97,8 +98,8 @@
JSONArray privileges = data.getJSONArray("privileges");
- if(!SecureInvocation.secure(this.getClass())){
- return new ResultVo(ResultVo.CODE_OK,privileges.toJSONString(),ResultVo.EMPTY_ARRAY);
+ if (!SecureInvocation.secure(this.getClass())) {
+ return new ResultVo(ResultVo.CODE_OK, privileges.toJSONString(), ResultVo.EMPTY_ARRAY);
}
return new ResultVo(responseEntity.getStatusCode() == HttpStatus.OK ? ResultVo.CODE_OK : ResultVo.CODE_ERROR, privileges.toJSONString());
--
Gitblit v1.8.0