fix: 修复了无社团用户无法登录的BUG

This commit is contained in:
wzp 2024-05-06 17:16:42 +08:00
parent 6f87eeb619
commit 652359714c
2 changed files with 5 additions and 2 deletions

View File

@ -2,5 +2,5 @@ package org.mmga.clubs.entities.user;
import java.util.Date;
public record UserVo(int id, String name, String password, int auth, String avatar, Date createTime, Date updateTime) {
public record UserVo(Integer id, String name, String password, int auth, String avatar, Date createTime, Date updateTime) {
}

View File

@ -41,7 +41,10 @@ public class ClubService {
club.setCommit(clubById.commit());
return club;
}
public Club getClubByUserId(int userId){
public Club getClubByUserId(Integer userId){
if (userId == null){
return null;
}
ClubUserAuthVo clubUserAuthVoByUserId = this.clubUserAuthDao.getClubUserAuthVoByUserId(userId);
int i = clubUserAuthVoByUserId.authId();
Auth auth = i != -1 ? authService.getAuthById(i) : null;