Commit ba6126bc by 裴大威

Merge branch 'cookieAddProperty' into 'master'

cookie add mainWechatUserId

See merge request rays/pcloud-common-parent!69
parents a42245ae dfabe677
......@@ -113,6 +113,8 @@ public class Cookie {
*/
public static final String QRCODE_ID = "qrcodeId";
public static final String MAIN_USER_ID = "mainUserId";
/**
* cookie 信息處理
* @param userInfo
......@@ -249,6 +251,12 @@ public class Cookie {
userInfos.put(QRCODE_ID, StringUtil.isEmpty(code) || "undefined".equalsIgnoreCase(code) || "null".equalsIgnoreCase(code) ? null
: NumberUtil.toLong(code));
}
if (userInfoArry[i].contains(MAIN_USER_ID)) {
String[] user = userInfoArry[i].split("=");
String mainUserId = user[user.length - 1];
userInfos.put("mainUserId", StringUtil.isEmpty(mainUserId) || "undefined".equalsIgnoreCase(mainUserId)
|| "null".equalsIgnoreCase(mainUserId) ? null : NumberUtil.toLong(mainUserId));
}
}
return userInfos;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment