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

---
 springboot/src/main/java/com/java110/boot/smo/DefaultAbstractComponentSMO.java |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/springboot/src/main/java/com/java110/boot/smo/DefaultAbstractComponentSMO.java b/springboot/src/main/java/com/java110/boot/smo/DefaultAbstractComponentSMO.java
index f7236a2..e8d85bb 100644
--- a/springboot/src/main/java/com/java110/boot/smo/DefaultAbstractComponentSMO.java
+++ b/springboot/src/main/java/com/java110/boot/smo/DefaultAbstractComponentSMO.java
@@ -381,14 +381,10 @@
         Assert.hasLength(pd.getUserId(), "鐢ㄦ埛鏈櫥褰曡鍏堢櫥褰�");
 
         ResultVo resultVo = getCommunityStoreInfoSMOImpl.getStoreInfo(pd, restTemplate, pd.getUserId());
-        logger.debug("ruleId getStoreInfo 锛歿}", resultVo.toString());
+        logger.debug("鏌ヨ鍟嗘埛淇℃伅 getStoreInfo 锛歿}", resultVo.toString());
         return new ResponseEntity<String>(resultVo.getMsg(), resultVo.getCode() == ResultVo.CODE_OK ? HttpStatus.OK : HttpStatus.BAD_REQUEST);
     }
 
-    private ResponseEntity<String> getStoreEnterCommunitys(IPageData pd, String storeId, String storeTypeCd, RestTemplate restTemplate) {
-        ResultVo resultVo = getCommunityStoreInfoSMOImpl.getStoreEnterCommunitys(pd, storeId, storeTypeCd, restTemplate);
-        return new ResponseEntity<String>(resultVo.getMsg(), resultVo.getCode() == ResultVo.CODE_OK ? HttpStatus.OK : HttpStatus.BAD_REQUEST);
-    }
 
     /**
      * 鏌ヨ鍟嗘埛淇℃伅
@@ -397,17 +393,12 @@
      */
     protected void checkStoreEnterCommunity(IPageData pd, String storeId, String storeTypeCd, String communityId, RestTemplate restTemplate) {
         Assert.hasLength(pd.getUserId(), "鐢ㄦ埛鏈櫥褰曡鍏堢櫥褰�");
-        ResponseEntity<String> responseEntity = null;
-        responseEntity = getStoreEnterCommunitys(pd, storeId, storeTypeCd, restTemplate);
-        if (responseEntity.getStatusCode() != HttpStatus.OK) {
+        ResultVo resultVo =  getCommunityStoreInfoSMOImpl.getStoreEnterCommunitys(pd, storeId, storeTypeCd, restTemplate);
+        if (resultVo.getCode() != ResultVo.CODE_OK) {
             throw new SMOException(ResponseConstant.RESULT_CODE_ERROR, "杩樻湭鍏ラ┗灏忓尯锛岃鍏堝叆椹诲皬鍖�");
         }
 
-        Assert.jsonObjectHaveKey(responseEntity.getBody().toString(), "data", "杩樻湭鍏ラ┗灏忓尯锛岃鍏堝叆椹诲皬鍖�");
-
-        JSONObject community = JSONObject.parseObject(responseEntity.getBody().toString());
-
-        JSONArray communitys = community.getJSONArray("data");
+        JSONArray communitys = JSONArray.parseArray(resultVo.getData().toString());
 
         if (communitys == null || communitys.size() == 0) {
             throw new SMOException(ResponseConstant.RESULT_CODE_ERROR, "杩樻湭鍏ラ┗灏忓尯锛岃鍏堝叆椹诲皬鍖�");
@@ -420,7 +411,6 @@
         }
 
     }
-
 
     private JSONObject getCurrentCommunity(JSONArray communitys, String communityId) {
         for (int communityIndex = 0; communityIndex < communitys.size(); communityIndex++) {

--
Gitblit v1.8.0