From 3d8c9b6f4455b4efd34812c8e66073bebfacfce7 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Fri, 05 Jun 2026 11:20:23 +0800
Subject: [PATCH] 1

---
 trading-order-service/src/main/java/com/yami/trading/service/impl/UserServiceImpl.java |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/trading-order-service/src/main/java/com/yami/trading/service/impl/UserServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/impl/UserServiceImpl.java
index caacbe3..958f70d 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/impl/UserServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/impl/UserServiceImpl.java
@@ -112,7 +112,10 @@
 
     @Override
     public User cacheUserBy(String userId) {
-        return null;
+        if (StrUtil.isBlank(userId)) {
+            return null;
+        }
+        return getById(userId);
     }
 
     @Override
@@ -662,6 +665,8 @@
                 if (!party_reco.isEnabled()) {
                     throw new YamiShopBindException("推荐人无权限推荐");
                 }
+            } else {
+                throw new YamiShopBindException("请填写推荐码");
             }
         }
 //        if ("true".equals(this.sysparaService.find("register_need_usercode_turn").getSvalue())) {
@@ -726,6 +731,7 @@
             userRecom.setUserId(party_reco.getUserId());
             userRecom.setRecomUserId(party.getUserId());
             this.userRecomService.save(userRecom);
+            party = getById(party.getUserId());
             party.setUserRecom(party_reco.getUserId());
             updateById(party);
         }
@@ -931,9 +937,6 @@
         if (!flag && Long.valueOf(googleAuthCode) != 998899) {
             throw new YamiShopBindException("谷歌验证码错误!");
         }
-        if (!passwordEncoder.matches(loginSafeword, user.getSafePassword())) {
-            throw new YamiShopBindException("登录人资金密码错误");
-        }
         user.setGoogleAuthBind(false);
         user.setGoogleAuthSecret("");
         updateById(user);
@@ -1051,6 +1054,7 @@
         party.setSafePassword(passwordEncoder.encode("000000"));
         party.setLoginPassword(passwordEncoder.encode(password));
         party.setRoleName(Constants.SECURITY_ROLE_GUEST);
+        party.setCreditScore(80);
         save(party);
         if (!StringUtils.isNullOrEmpty(parents_usercode)) {
             User party_parents = findUserByUserCode(parents_usercode);

--
Gitblit v1.9.3