From 3fdc508014c167ee5b1e4afca62fee7fb87b62e9 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期三, 06 八月 2025 09:40:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java |   10 +++++++++-
 framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java   |    5 ++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java b/framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java
index 42dfb1d..07587fc 100644
--- a/framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java
+++ b/framework/src/main/java/cn/lili/modules/connect/serviceimpl/ConnectServiceImpl.java
@@ -14,6 +14,7 @@
 import cn.lili.common.security.context.UserContext;
 import cn.lili.common.security.token.Token;
 import cn.lili.common.utils.HttpUtils;
+import cn.lili.common.utils.StringUtils;
 import cn.lili.common.utils.UuidUtils;
 import cn.lili.modules.connect.entity.Connect;
 import cn.lili.modules.connect.entity.dto.AuthToken;
@@ -130,6 +131,7 @@
         Map<String, String> map = new HashMap<>(3);
         //寰楀埌寰俊灏忕▼搴忚仈鍚堢櫥闄嗕俊鎭�
         JSONObject json = this.getConnect(params.getCode());
+        System.out.println(json);
         //瀛樺偍session key 鍚庣画鐧诲綍鐢ㄥ緱鍒�
         String sessionKey = json.getStr("session_key");
         String unionId = json.getStr("unionid");
@@ -137,7 +139,7 @@
         map.put("sessionKey", sessionKey);
         map.put("unionId", unionId);
         map.put("openId", openId);
-
+        System.out.println(sessionKey);
         //寰俊鑱斿悎鐧婚檰鍙傛暟
         return phoneMpBindAndLogin(map.get("sessionKey"), params, map.get("openId"), map.get("unionId"));
     }
@@ -343,9 +345,15 @@
                     //濡傛灉鏈粦瀹氫細鍛橈紝鍒欐妸鍒氭墠鏌ヨ鍒扮殑鑱斿悎鐧诲綍琛ㄦ暟鎹垹闄�
                     if (member == null) {
                         this.remove(queryWrapper);
+
                         member = memberService.autoRegister(authUser,encryptTwice);
                     }
                 }
+            }else {
+                if (StringUtils.isBlank(member.getMobile())) {
+                    member.setMobile(authUser.getPhone());
+                    memberService.updateById(member);
+                }
             }
 
             //鍙戦�佺敤鎴风涓夋柟鐧诲綍娑堟伅
diff --git a/framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java b/framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java
index 24799c6..2f145e8 100644
--- a/framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java
+++ b/framework/src/main/java/cn/lili/modules/member/serviceimpl/MemberServiceImpl.java
@@ -534,10 +534,13 @@
     @Override
     public Result updateMemberNickName(MemberNickNameForm form) {
         Member member = baseMapper.selectById(form.getMemberId());
+        boolean update = false;
         if ("寰俊鐢ㄦ埛".equals(member.getNickName()) || StringUtils.isBlank(member.getNickName())) {
             member.setNickName(form.getNickName());
+            update = true;
+        }
+        if (update){
             baseMapper.updateById(member);
-            return Result.ok().data(member.getNickName());
         }
         return Result.ok().data(member.getNickName());
     }

--
Gitblit v1.8.0