|
@@ -20,6 +20,7 @@ class CustomMetaObjectHandler : MetaObjectHandler() {
|
|
|
}
|
|
|
|
|
|
override fun insertFill(metaObject: MetaObject?) {
|
|
|
+ val temp = DynamicMultipleDataSource.getDataSource()
|
|
|
logger.debug("公共字段自动填充: insertFill ${SSOUtil.getCurUser()?.account}")
|
|
|
if (getFieldValByName("createBy", metaObject) == null) {
|
|
|
setFieldValByName("createBy", SSOUtil.getCurUser()?.account, metaObject)
|
|
@@ -27,13 +28,16 @@ class CustomMetaObjectHandler : MetaObjectHandler() {
|
|
|
if (getFieldValByName("createTime", metaObject) == null) {
|
|
|
setFieldValByName("createTime", Date(), metaObject)
|
|
|
}
|
|
|
+ DynamicMultipleDataSource.setDataSource(temp)
|
|
|
}
|
|
|
|
|
|
override fun updateFill(metaObject: MetaObject?) {
|
|
|
+ val temp = DynamicMultipleDataSource.getDataSource()
|
|
|
logger.debug("公共字段自动填充: updateFill ${SSOUtil.getCurUser()?.account}")
|
|
|
if (getFieldValByName("updateBy", metaObject) == null) {
|
|
|
setFieldValByName("updateBy", SSOUtil.getCurUser()?.account, metaObject)
|
|
|
}
|
|
|
setFieldValByName("updateTime", Date(), metaObject)
|
|
|
+ DynamicMultipleDataSource.setDataSource(temp)
|
|
|
}
|
|
|
}
|