feat: 注册用户时自动分配角色
This commit is contained in:
parent
2ed13df03b
commit
b1b4f3a95e
|
@ -278,7 +278,9 @@ public class SysUserServiceImpl implements ISysUserService
|
||||||
@Override
|
@Override
|
||||||
public boolean registerUser(SysUser user)
|
public boolean registerUser(SysUser user)
|
||||||
{
|
{
|
||||||
return userMapper.insertUser(user) > 0;
|
int res = userMapper.insertUser(user);
|
||||||
|
insertUserRole(user.getUserId(),new Long[]{2L});
|
||||||
|
return res > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue