feat: 注册用户时自动分配角色

This commit is contained in:
LokerL 2024-12-04 20:41:11 +08:00
parent 2ed13df03b
commit b1b4f3a95e
1 changed files with 3 additions and 1 deletions

View File

@ -278,7 +278,9 @@ public class SysUserServiceImpl implements ISysUserService
@Override
public boolean registerUser(SysUser user)
{
return userMapper.insertUser(user) > 0;
int res = userMapper.insertUser(user);
insertUserRole(user.getUserId(),new Long[]{2L});
return res > 0;
}
/**