From 411969192fb7f4fe8b934b7cf35571b4a7815879 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=BE=E6=96=87=E8=B1=AA?= <980287353@qq.com>
Date: Wed, 20 Aug 2025 15:29:46 +0800
Subject: [PATCH] publish 2.0.17-test
---
.gitlab-ci.yml | 17 ---------------
pom.xml | 18 ++++++++--------
springboot-ademo/pom.xml | 4 ++--
springboot-annotation/pom.xml | 2 +-
springboot-database/pom.xml | 2 +-
springboot-login/pom.xml | 2 +-
.../login/controller/LoginController.java | 2 +-
springboot-message/pom.xml | 2 +-
springboot-platform/pom.xml | 2 +-
.../config/wxmp/PlatformWxmpConfig.java | 3 ++-
.../config/wxmp/bean/WxOAuth2AccessToken.java | 21 ++++++++++++++++++-
.../platform/config/wxmp/bean/WxUserInfo.java | 16 ++++++++++++--
springboot-role/pom.xml | 2 +-
springboot-util/pom.xml | 2 +-
springboot-web/pom.xml | 2 +-
15 files changed, 56 insertions(+), 41 deletions(-)
delete mode 100644 .gitlab-ci.yml
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
deleted file mode 100644
index 589a39d..0000000
--- a/.gitlab-ci.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-stages:
- - deploy
-
-deploy-jar:
- stage: deploy
- tags:
- - zengos
- rules:
- - if: $CI_COMMIT_TAG
- script:
- - mvn clean deploy -Dmaven.test.skip -DaltDeploymentRepository=master::default::file:$TAG_REPO_FOLDER
- - cd $TAG_REPO_FOLDER
- - git checkout master
- - git pull
- - git add .
- - git commit -m "deploy $CI_PROJECT_NAME $CI_COMMIT_TAG"
- - git push origin master
diff --git a/pom.xml b/pom.xml
index b57c602..116529d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.17
+ 2.0.17-test
pom
springboot-parent
杭州铁晟科技有限公司基础依赖
@@ -58,49 +58,49 @@
com.tiesheng.springboot-parent
springboot-database
- 2.0.17
+ 2.0.17-test
com.tiesheng.springboot-parent
springboot-login
- 2.0.17
+ 2.0.17-test
com.tiesheng.springboot-parent
springboot-web
- 2.0.17
+ 2.0.17-test
com.tiesheng.springboot-parent
springboot-util
- 2.0.17
+ 2.0.17-test
com.tiesheng.springboot-parent
springboot-platform
- 2.0.17
+ 2.0.17-test
com.tiesheng.springboot-parent
springboot-message
- 2.0.17
+ 2.0.17-test
com.tiesheng.springboot-parent
springboot-role
- 2.0.17
+ 2.0.17-test
com.tiesheng.springboot-parent
springboot-annotation
- 2.0.17
+ 2.0.17-test
diff --git a/springboot-ademo/pom.xml b/springboot-ademo/pom.xml
index ff3e885..f8e9980 100644
--- a/springboot-ademo/pom.xml
+++ b/springboot-ademo/pom.xml
@@ -6,11 +6,11 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.17
+ 2.0.17-test
springboot-ademo
- 2.0.17
+ 2.0.17-test
8
diff --git a/springboot-annotation/pom.xml b/springboot-annotation/pom.xml
index 29ad14e..57241ef 100644
--- a/springboot-annotation/pom.xml
+++ b/springboot-annotation/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.17
+ 2.0.17-test
springboot-annotation
diff --git a/springboot-database/pom.xml b/springboot-database/pom.xml
index a5cee0a..2b98218 100644
--- a/springboot-database/pom.xml
+++ b/springboot-database/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.17
+ 2.0.17-test
springboot-database
diff --git a/springboot-login/pom.xml b/springboot-login/pom.xml
index ab69d53..993c6ed 100644
--- a/springboot-login/pom.xml
+++ b/springboot-login/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.17
+ 2.0.17-test
springboot-login
diff --git a/springboot-login/src/main/java/com/tiesheng/login/controller/LoginController.java b/springboot-login/src/main/java/com/tiesheng/login/controller/LoginController.java
index b019355..c7dc25c 100644
--- a/springboot-login/src/main/java/com/tiesheng/login/controller/LoginController.java
+++ b/springboot-login/src/main/java/com/tiesheng/login/controller/LoginController.java
@@ -170,7 +170,7 @@ public class LoginController {
extra = "";
}
String configUrl = globalConfig.buildPath("/login/wxmp/oauth2/" + service + "?extra=" + extra);
- String authorizationUrl = platformWxmpConfig.buildAuthorizationUrl(service, configUrl, "snsapi_userinfo");
+ String authorizationUrl = platformWxmpConfig.buildAuthorizationUrl(service, configUrl, "snsapi_base");
response.sendRedirect(authorizationUrl);
}
diff --git a/springboot-message/pom.xml b/springboot-message/pom.xml
index ec0b46b..5bab2e3 100644
--- a/springboot-message/pom.xml
+++ b/springboot-message/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.17
+ 2.0.17-test
springboot-message
diff --git a/springboot-platform/pom.xml b/springboot-platform/pom.xml
index 18fdba2..c56a2f9 100644
--- a/springboot-platform/pom.xml
+++ b/springboot-platform/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.17
+ 2.0.17-test
springboot-platform
diff --git a/springboot-platform/src/main/java/com/tiesheng/platform/config/wxmp/PlatformWxmpConfig.java b/springboot-platform/src/main/java/com/tiesheng/platform/config/wxmp/PlatformWxmpConfig.java
index 2cba4ef..1785ed2 100644
--- a/springboot-platform/src/main/java/com/tiesheng/platform/config/wxmp/PlatformWxmpConfig.java
+++ b/springboot-platform/src/main/java/com/tiesheng/platform/config/wxmp/PlatformWxmpConfig.java
@@ -162,7 +162,8 @@ public class PlatformWxmpConfig {
///////////////////////////////////////////////////////////////////////////
// setter\getter
- ///////////////////////////////////////////////////////////////////////////
+
+ /// ////////////////////////////////////////////////////////////////////////
public Map getConfigs() {
return configs;
diff --git a/springboot-platform/src/main/java/com/tiesheng/platform/config/wxmp/bean/WxOAuth2AccessToken.java b/springboot-platform/src/main/java/com/tiesheng/platform/config/wxmp/bean/WxOAuth2AccessToken.java
index f05e7e6..0830ab8 100644
--- a/springboot-platform/src/main/java/com/tiesheng/platform/config/wxmp/bean/WxOAuth2AccessToken.java
+++ b/springboot-platform/src/main/java/com/tiesheng/platform/config/wxmp/bean/WxOAuth2AccessToken.java
@@ -11,6 +11,7 @@ public class WxOAuth2AccessToken {
private String accessToken;
private String openid;
+ private String isSnapshotuser;
public static WxOAuth2AccessToken create(String appId, String secret, String code) {
String response = OkHttpUtil.get("https://api.weixin.qq.com/sns/oauth2/access_token" +
@@ -23,10 +24,20 @@ public class WxOAuth2AccessToken {
return oAuth2AccessToken;
}
+ /**
+ * 是否是真实用户
+ *
+ * @return
+ */
+ public boolean isRealUser() {
+ return !"1".equals(isSnapshotuser);
+ }
+
///////////////////////////////////////////////////////////////////////////
// setter\getter
- ///////////////////////////////////////////////////////////////////////////
+
+ /// ////////////////////////////////////////////////////////////////////////
public String getAccessToken() {
return accessToken;
@@ -43,4 +54,12 @@ public class WxOAuth2AccessToken {
public void setOpenid(String openid) {
this.openid = openid;
}
+
+ public String getIsSnapshotuser() {
+ return isSnapshotuser;
+ }
+
+ public void setIsSnapshotuser(String isSnapshotuser) {
+ this.isSnapshotuser = isSnapshotuser;
+ }
}
diff --git a/springboot-platform/src/main/java/com/tiesheng/platform/config/wxmp/bean/WxUserInfo.java b/springboot-platform/src/main/java/com/tiesheng/platform/config/wxmp/bean/WxUserInfo.java
index e650b23..f5440ca 100644
--- a/springboot-platform/src/main/java/com/tiesheng/platform/config/wxmp/bean/WxUserInfo.java
+++ b/springboot-platform/src/main/java/com/tiesheng/platform/config/wxmp/bean/WxUserInfo.java
@@ -17,6 +17,7 @@ public class WxUserInfo {
private String headimgurl;
private String openid;
private String appId;
+ private boolean isRealUser;
///////////////////////////////////////////////////////////////////////////
// 逻辑方法
@@ -33,13 +34,16 @@ public class WxUserInfo {
String s = OkHttpUtil.get("https://api.weixin.qq.com/sns/userinfo"
+ "?access_token=" + oAuth2AccessToken.getAccessToken()
+ "&openid=" + oAuth2AccessToken.getOpenid() + "&lang=zh_CN");
- return JSON.parseObject(s, WxUserInfo.class);
+ WxUserInfo wxUserInfo = JSON.parseObject(s, WxUserInfo.class);
+ wxUserInfo.setRealUser(oAuth2AccessToken.isRealUser());
+ return wxUserInfo;
}
///////////////////////////////////////////////////////////////////////////
// setter\getter
- ///////////////////////////////////////////////////////////////////////////
+
+ /// ////////////////////////////////////////////////////////////////////////
public String getAccessToken() {
return accessToken;
@@ -112,4 +116,12 @@ public class WxUserInfo {
public void setAppId(String appId) {
this.appId = appId;
}
+
+ public boolean isRealUser() {
+ return isRealUser;
+ }
+
+ public void setRealUser(boolean realUser) {
+ isRealUser = realUser;
+ }
}
diff --git a/springboot-role/pom.xml b/springboot-role/pom.xml
index 1382723..cb36262 100644
--- a/springboot-role/pom.xml
+++ b/springboot-role/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.17
+ 2.0.17-test
springboot-role
diff --git a/springboot-util/pom.xml b/springboot-util/pom.xml
index 989dd77..99b3eed 100644
--- a/springboot-util/pom.xml
+++ b/springboot-util/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.17
+ 2.0.17-test
springboot-util
diff --git a/springboot-web/pom.xml b/springboot-web/pom.xml
index f897eb1..6d7af21 100644
--- a/springboot-web/pom.xml
+++ b/springboot-web/pom.xml
@@ -6,7 +6,7 @@
com.tiesheng.springboot-parent
springboot-parent
- 2.0.17
+ 2.0.17-test
springboot-web