From 02c6aa0847cdbb84d8a5e99ae6cf64b45c5d8ce1 Mon Sep 17 00:00:00 2001 From: gongjiale <942894820@qq.com> Date: Wed, 4 Dec 2024 19:49:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E7=82=B9=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/system/controller/BbcController.java | 13 ++++++++----- .../system/controller/SysLoginController.java | 2 +- .../main/resources/mybatis/system/SysUserMapper.xml | 7 +++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/controller/BbcController.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/controller/BbcController.java index 751570f..fcfbce5 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/controller/BbcController.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/controller/BbcController.java @@ -197,13 +197,16 @@ public class BbcController extends BaseController { user.setPhonenumber(mobile); user.setStatus(status); user.setNickName(nickName); - Random random = new Random(); - int min = 8000; - int max = 9000; - int randomNumber = random.nextInt(max - min + 1) + min; - user.setUserId(Long.valueOf(randomNumber)); +// Random random = new Random(); +// int min = 8000; +// int max = 9000; +// int randomNumber = random.nextInt(max - min + 1) + min; +// user.setUserId(Long.valueOf(randomNumber)); 删除 随机数id 使用序列新增 //用户创建 userService.registerUser(user); + /** + * todo 新增 用户权限 给予默认 角色 + */ //获取返回给IAM连接器的唯一标识,用于后续该条数据的更新修改删除 String uid = user.getUserId() + ""; if (uid != null) { diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/controller/SysLoginController.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/controller/SysLoginController.java index 0a58c0d..d3d9a7b 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/controller/SysLoginController.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/system/controller/SysLoginController.java @@ -64,7 +64,7 @@ public class SysLoginController AjaxResult ajax = AjaxResult.success(); // 生成令牌 String password= AESUtil.decrypt(loginBody.getPassword()); - String token = loginService.loginNoCode(loginBody.getUsername().toLowerCase(Locale.ROOT),password, loginBody.getCode(), + String token = loginService.loginNoCode(loginBody.getUsername().toUpperCase(Locale.ROOT),password, loginBody.getCode(), loginBody.getUuid()); ajax.put(Constants.TOKEN, token); return ajax; diff --git a/RuoYi-Vue-Oracle/src/main/resources/mybatis/system/SysUserMapper.xml b/RuoYi-Vue-Oracle/src/main/resources/mybatis/system/SysUserMapper.xml index a179411..021c1a2 100644 --- a/RuoYi-Vue-Oracle/src/main/resources/mybatis/system/SysUserMapper.xml +++ b/RuoYi-Vue-Oracle/src/main/resources/mybatis/system/SysUserMapper.xml @@ -155,9 +155,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - + + + + select seq_sys_user.nextval as userId from DUAL + insert into sys_user( user_id, dept_id,