Skip to content

Commit

Permalink
fix: 修复插入第三方登录用户时报错
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Jun 6, 2024
1 parent 1d60213 commit 0cfc7a5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.apache.ibatis.reflection.MetaObject;
import top.continew.admin.common.util.helper.LoginHelper;
import top.continew.starter.core.exception.BusinessException;
import top.continew.starter.core.util.ExceptionUtils;
import top.continew.starter.extension.crud.model.entity.BaseDO;

import java.time.LocalDateTime;
Expand Down Expand Up @@ -61,8 +62,7 @@ public void insertFill(MetaObject metaObject) {
if (null == metaObject) {
return;
}

Long createUser = LoginHelper.getUserId();
Long createUser = ExceptionUtils.exToNull(LoginHelper::getUserId);
LocalDateTime createTime = LocalDateTime.now();
if (metaObject.getOriginalObject() instanceof BaseDO baseDO) {
// 继承了 BaseDO 的类,填充创建信息字段
Expand Down

0 comments on commit 0cfc7a5

Please sign in to comment.