mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-05-12 14:52:07 +08:00
update 优化 自动填充更新人逻辑
This commit is contained in:
@@ -55,12 +55,10 @@ public class InjectionMetaObjectHandler implements MetaObjectHandler {
|
|||||||
Date current = new Date();
|
Date current = new Date();
|
||||||
// 更新时间填充(不管为不为空)
|
// 更新时间填充(不管为不为空)
|
||||||
baseEntity.setUpdateTime(current);
|
baseEntity.setUpdateTime(current);
|
||||||
if (ObjectUtil.isNull(baseEntity.getUpdateBy())) {
|
|
||||||
LoginUser loginUser = getLoginUser();
|
|
||||||
// 当前已登录 更新人填充(不管为不为空)
|
// 当前已登录 更新人填充(不管为不为空)
|
||||||
if (ObjectUtil.isNotNull(loginUser)) {
|
Long userId = LoginHelper.getUserId();
|
||||||
baseEntity.setUpdateBy(loginUser.getUserId());
|
if (ObjectUtil.isNotNull(userId)) {
|
||||||
}
|
baseEntity.setUpdateBy(userId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user