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

This commit is contained in:
wzp 2024-05-06 17:33:39 +08:00
commit 7ae9843c89
2 changed files with 2 additions and 5 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,11 +41,8 @@ public class ClubService {
club.setCommit(clubById.commit());
return club;
}
public Club getClubByUserId(Integer userId){
public Club getClubByUserId(int userId){
ClubUserAuthVo clubUserAuthVoByUserId = this.clubUserAuthDao.getClubUserAuthVoByUserId(userId);
if (clubUserAuthVoByUserId == null){
return null;
}
int i = clubUserAuthVoByUserId.authId();
Auth auth = i != -1 ? authService.getAuthById(i) : null;
Club clubById = getClubWithoutAuthById(clubUserAuthVoByUserId.clubId());