From e7dc5a427deda8e5b43ee6f13a3169734caf2c13 Mon Sep 17 00:00:00 2001
From: 吴学文 <wuxuewen@wuxuewendeMacBook-Pro.local>
Date: 星期六, 27 四月 2019 01:39:52 +0800
Subject: [PATCH] 小区增加开发完成

---
 WebService/src/main/java/com/java110/web/core/BaseComponentSMO.java |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/WebService/src/main/java/com/java110/web/core/BaseComponentSMO.java b/WebService/src/main/java/com/java110/web/core/BaseComponentSMO.java
index 6977c2d..a89f29f 100644
--- a/WebService/src/main/java/com/java110/web/core/BaseComponentSMO.java
+++ b/WebService/src/main/java/com/java110/web/core/BaseComponentSMO.java
@@ -5,6 +5,7 @@
 import com.java110.common.cache.MappingCache;
 import com.java110.common.constant.CommonConstant;
 import com.java110.common.constant.MappingConstant;
+import com.java110.common.constant.ResponseConstant;
 import com.java110.common.constant.ServiceConstant;
 import com.java110.common.exception.SMOException;
 import com.java110.common.factory.ApplicationContextFactory;
@@ -105,9 +106,9 @@
         ResponseEntity<String> responseEntity = null;
         responseEntity = this.callCenterService(restTemplate, pd, "",
                 ServiceConstant.SERVICE_API_URL + "/api/query.myCommunity.byMember?memberId=" + storeId + "&memberTypeCd="
-                        + MappingCache.getValue(MappingConstant.DOMAIN_STORE_TYPE_2_COMMUNITY_MEMBER_TYPE,storeTypeCd), HttpMethod.GET);
+                        + MappingCache.getValue(MappingConstant.DOMAIN_STORE_TYPE_2_COMMUNITY_MEMBER_TYPE, storeTypeCd), HttpMethod.GET);
         if (responseEntity.getStatusCode() != HttpStatus.OK) {
-            throw new SMOException(1999, "杩樻湭鍏ラ┗灏忓尯锛岃鍏堝叆椹诲皬鍖�");
+            throw new SMOException(ResponseConstant.RESULT_CODE_ERROR, "杩樻湭鍏ラ┗灏忓尯锛岃鍏堝叆椹诲皬鍖�");
         }
 
         Assert.jsonObjectHaveKey(responseEntity.getBody().toString(), "communitys", "杩樻湭鍏ラ┗灏忓尯锛岃鍏堝叆椹诲皬鍖�");
@@ -117,20 +118,20 @@
         JSONArray communitys = community.getJSONArray("communitys");
 
         if (communitys == null || communitys.size() == 0) {
-            throw new SMOException(1999, "杩樻湭鍏ラ┗灏忓尯锛岃鍏堝叆椹诲皬鍖�");
+            throw new SMOException(ResponseConstant.RESULT_CODE_ERROR, "杩樻湭鍏ラ┗灏忓尯锛岃鍏堝叆椹诲皬鍖�");
         }
 
-        JSONObject currentCommunity = getCurrentCommunity(communitys,communityId);
+        JSONObject currentCommunity = getCurrentCommunity(communitys, communityId);
 
-        if(currentCommunity == null){
-            throw new SMOException(1999, "浼犲叆灏忓尯ID闈炴硶锛岃姝e父鎿嶄綔");
+        if (currentCommunity == null) {
+            throw new SMOException(ResponseConstant.RESULT_CODE_ERROR, "浼犲叆灏忓尯ID闈炴硶锛岃姝e父鎿嶄綔");
         }
 
     }
 
-    private JSONObject getCurrentCommunity(JSONArray communitys,String communityId){
+    private JSONObject getCurrentCommunity(JSONArray communitys, String communityId) {
         for (int communityIndex = 0; communityIndex < communitys.size(); communityIndex++) {
-            if(communityId.equals(communitys.getJSONObject(communityIndex).getString("communityId"))){
+            if (communityId.equals(communitys.getJSONObject(communityIndex).getString("communityId"))) {
                 return communitys.getJSONObject(communityIndex);
             }
         }

--
Gitblit v1.8.0