Merge branch 'main' of http://39.101.199.1:8888/gongjiale/gangkou
This commit is contained in:
commit
2ed13df03b
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -155,9 +155,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!-- <selectKey keyProperty="userId" order="BEFORE" resultType="Long">-->
|
||||
<!-- select seq_sys_user.nextval as userId from DUAL-->
|
||||
<!-- </selectKey>-->
|
||||
<!-- <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">-->
|
||||
<insert id="insertUser" parameterType="SysUser" >
|
||||
<!-- <insert id="insertUser" parameterType="SysUser" >-->
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
|
||||
<selectKey keyProperty="userId" order="BEFORE" resultType="Long">
|
||||
select seq_sys_user.nextval as userId from DUAL
|
||||
</selectKey>
|
||||
insert into sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
|
|
Loading…
Reference in New Issue