From 4ed7ff50eecdc85c5bf10e6534757900f52762cf Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期一, 22 六月 2020 14:20:24 +0800
Subject: [PATCH] 优化小程序无法登录问题

---
 service-front/src/main/java/com/java110/front/controller/wechat/WechatGatewayController.java |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/service-front/src/main/java/com/java110/front/controller/wechat/WechatGatewayController.java b/service-front/src/main/java/com/java110/front/controller/wechat/WechatGatewayController.java
index 1d80f0a..2329525 100644
--- a/service-front/src/main/java/com/java110/front/controller/wechat/WechatGatewayController.java
+++ b/service-front/src/main/java/com/java110/front/controller/wechat/WechatGatewayController.java
@@ -6,6 +6,8 @@
 import com.java110.core.context.IPageData;
 import com.java110.core.context.PageData;
 import com.java110.core.factory.AuthenticationFactory;
+import com.java110.dto.smallWeChat.SmallWeChatDto;
+import com.java110.dto.smallWechatAttr.SmallWechatAttrDto;
 import com.java110.front.smo.wechatGateway.IWechatGatewaySMO;
 import com.java110.utils.cache.MappingCache;
 import com.java110.utils.constant.WechatConstant;
@@ -25,6 +27,7 @@
 
 import javax.servlet.http.HttpServletRequest;
 import java.util.Arrays;
+import java.util.List;
 
 /**
  * @ClassName WechatController
@@ -57,6 +60,25 @@
         String timestamp = request.getParameter("timestamp");
         String nonce = request.getParameter("nonce");
         String echostr = request.getParameter("echostr");
+        String communityId = request.getParameter("communityId");
+        String java110AppId = request.getParameter("java110AppId");
+        IPageData pd = PageData.newInstance().builder("-1", "", "", "",
+                "", "", "", "",
+                java110AppId);
+        if(!StringUtil.isEmpty(communityId)){
+            SmallWeChatDto smallWeChatDto = new SmallWeChatDto();
+            smallWeChatDto.setObjType(SmallWeChatDto.OBJ_TYPE_COMMUNITY);
+            smallWeChatDto.setObjId(communityId);
+            smallWeChatDto = wechatGatewaySMOImpl.getSmallWechat(pd,smallWeChatDto);
+
+            if(smallWeChatDto !=null){
+                List<SmallWechatAttrDto> smallWechatAttrDtos = smallWeChatDto.getSmallWechatAttrs();
+
+                if(smallWechatAttrDtos != null){
+                   // for()
+                }
+            }
+        }
         String responseStr = "";
         logger.debug("token = " + token + "||||" + "signature = " + signature + "|||" + "timestamp = "
                 + timestamp + "|||" + "nonce = " + nonce + "|||" + "echostr = " + echostr);

--
Gitblit v1.8.0