Commit 200b981e by HlQ

[fix] 创建用户和修改用户默认填充修改

1 parent 3cb90a9d
...@@ -28,11 +28,11 @@ public class MyBatisPlusConfig implements MetaObjectHandler { ...@@ -28,11 +28,11 @@ public class MyBatisPlusConfig implements MetaObjectHandler {
// 获取当前登录用户,并填充 // 获取当前登录用户,并填充
var vo = (UserVO) StpUtil.getTokenSession().get("curLoginUser"); var vo = (UserVO) StpUtil.getTokenSession().get("curLoginUser");
this.fillHasGetter(metaObject, "creator", vo.getUserid()); this.fillHasGetter(metaObject, "creator", vo.getUserid());
this.fillHasGetter(metaObject, "createBy", vo.getUserid()); this.fillHasGetter(metaObject, "createBy", vo.getId());
this.fillHasGetter(metaObject, "createUser", vo.getUserid()); this.fillHasGetter(metaObject, "createUser", vo.getId());
this.fillHasGetter(metaObject, "updater", vo.getUserid()); this.fillHasGetter(metaObject, "updater", vo.getId());
this.fillHasGetter(metaObject, "updateBy", vo.getUserid()); this.fillHasGetter(metaObject, "updateBy", vo.getId());
this.fillHasGetter(metaObject, "updateUser", vo.getUserid()); this.fillHasGetter(metaObject, "updateUser", vo.getId());
} catch (Exception ignored) { } catch (Exception ignored) {
} }
} }
...@@ -44,7 +44,7 @@ public class MyBatisPlusConfig implements MetaObjectHandler { ...@@ -44,7 +44,7 @@ public class MyBatisPlusConfig implements MetaObjectHandler {
try { try {
var vo = (UserVO) StpUtil.getTokenSession().get("curLoginUser"); var vo = (UserVO) StpUtil.getTokenSession().get("curLoginUser");
this.fillHasGetter(metaObject, "updater", vo.getUserid()); this.fillHasGetter(metaObject, "updater", vo.getUserid());
this.fillHasGetter(metaObject, "updateBy", vo.getUserid()); this.fillHasGetter(metaObject, "updateBy", vo.getId());
} catch (Exception ignored) { } catch (Exception ignored) {
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!