Bladeren bron

fix 企业微信客服token

zoujiajian 2 jaren geleden
bovenliggende
commit
ba5d32ad07

+ 1 - 1
netflix-dao/src/main/resources/mapper/CorpUserFollowRelationMapper.xml

@@ -129,7 +129,7 @@
     </select>
 
     <select id="getCorpUserFollowRelation" resultType="com.cyksj.model.entity.CorpUserFollowRelation">
-        select cufr.id
+        select cufr.*
         from (select id
               from corp_user
               where unionid = #{unionId} limit 1) cu

+ 13 - 1
netflix-web/src/main/java/com/cyksj/web/controller/manage/corp/WxCorpController.java

@@ -223,7 +223,19 @@ public class WxCorpController {
 	}
 
 	public String getCorpUuid() {
-		return Optional.ofNullable(request.getHeader(CORP_UUID)).orElse(StringUtil.EMPTY);
+		Cookie[] cookies = this.request.getCookies();
+		if (cookies != null) {
+			Cookie[] var3 = cookies;
+			int var4 = cookies.length;
+
+			for(int var5 = 0; var5 < var4; ++var5) {
+				Cookie cookie = var3[var5];
+				if (cookie != null && CORP_UUID.equals(cookie.getName())) {
+					return cookie.getValue();
+				}
+			}
+		}
+		return StrUtil.EMPTY;
 	}