From 1496a2640408f000f31e01ebe90b5ef97237f5a1 Mon Sep 17 00:00:00 2001 From: zqy <2522236926@qq.com> Date: 星期二, 19 八月 2025 19:42:46 +0800 Subject: [PATCH] 修改婚姻bug && 管理员修改用户信息时 同步修改用户姓名、性别、婚姻状态 --- ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysRegisterService.java | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysRegisterService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysRegisterService.java index 63b6689..49b593c 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysRegisterService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysRegisterService.java @@ -1,6 +1,8 @@ package com.ruoyi.framework.web.service; +import com.ruoyi.common.core.domain.entity.SysRole; import com.ruoyi.mapper.ZfRegisterMapper; +import com.ruoyi.system.domain.SysUserRole; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.ruoyi.common.constant.CacheConstants; @@ -42,10 +44,13 @@ */ public String register(RegisterBody registerBody) { - String msg = "", username = registerBody.getUsername(), password = registerBody.getPassword(); + String msg = "", username = registerBody.getNickname(), password = registerBody.getPassword(); SysUser sysUser = new SysUser(); - sysUser.setUserName(username); +// System.out.println(username); +// System.out.println("+++++++++++++++++++++=="); + sysUser.setNickName(username); + sysUser.setUserName(username); // 楠岃瘉鐮佸紑鍏� boolean captchaEnabled = configService.selectCaptchaEnabled(); if (captchaEnabled) @@ -71,7 +76,7 @@ { msg = "瀵嗙爜闀垮害蹇呴』鍦�5鍒�20涓瓧绗︿箣闂�"; } - else if (!userService.checkUserNameUnique(sysUser)) + else if (!userService.checkNickNameUnique(sysUser)) { msg = "淇濆瓨鐢ㄦ埛'" + username + "'澶辫触锛屾敞鍐岃处鍙峰凡瀛樺湪"; } -- Gitblit v1.9.1