fix:修复系统初始化时保存数据获取用户id为空问题

V0.5.x
tangfudong 2024-03-06 17:36:43 +08:00
parent c5ac5b66db
commit 246c6b4c37
1 changed files with 1 additions and 1 deletions

View File

@ -14,6 +14,6 @@ import java.util.Optional;
public class UserIDAuditorConfig implements AuditorAware<Long> {
@Override
public Optional<Long> getCurrentAuditor() {
return Optional.of(LoginHelper.getUserId());
return Optional.of(LoginHelper.getUserId()==null?1l:LoginHelper.getUserId());
}
}