Skip to content

Commit

Permalink
MySQL的TIMESTAMP类型映射为TIMESTAMP(3)包含毫秒部分
Browse files Browse the repository at this point in the history
  • Loading branch information
entropy-cloud committed Aug 26, 2024
1 parent 3ab6d9c commit f4de087
Show file tree
Hide file tree
Showing 20 changed files with 246 additions and 210 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class BaseContext implements IContext {
private long expireTime;
private String userRefNo;
private String callIp;
private String dynAppId;
private Map<String, Object> propagateHeaders;
private final Map<String, Object> attributes = new ConcurrentHashMap<>();

Expand Down Expand Up @@ -153,6 +154,16 @@ public void setCallExpireTime(long expireTime) {
this.expireTime = expireTime;
}

@Override
public String getDynAppId() {
return dynAppId;
}

@Override
public void setDynAppId(String dynAppId) {
this.dynAppId = dynAppId;
}

protected ContextTaskQueue getTaskQueue() {
return taskQueue;
}
Expand Down Expand Up @@ -258,7 +269,7 @@ public boolean isRunningOnContext() {
}

@Override
public IContext getSourceContext(){
public IContext getSourceContext() {
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ public void setTenantId(String tenantId) {
context.setTenantId(tenantId);
}

@Override
public String getDynAppId() {
return context.getDynAppId();
}

@Override
public void setDynAppId(String dynAppId) {
context.setDynAppId(dynAppId);
}

@Override
public String getUserId() {
return context.getUserId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ default boolean isCallExpired() {

void setCallIp(String callIp);

/**
* 提供类似sandbox的动态隔离环境
*/
String getDynAppId();

void setDynAppId(String dynAppId);

Map<String, Object> getPropagateRpcHeaders();

void setPropagateRpcHeaders(Map<String, Object> propagateHeaders);
Expand Down
70 changes: 35 additions & 35 deletions nop-auth/deploy/sql/mysql/_create_nop-auth.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ CREATE TABLE nop_auth_dept(
DEL_FLAG TINYINT NULL COMMENT '删除标识',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_dept primary key (DEPT_ID)
);
Expand All @@ -24,9 +24,9 @@ CREATE TABLE nop_auth_position(
DEL_FLAG TINYINT NULL COMMENT '删除标识',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_position primary key (POSITION_ID)
);
Expand All @@ -39,9 +39,9 @@ CREATE TABLE nop_auth_role(
DEL_FLAG TINYINT NOT NULL COMMENT '删除标识',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint UK_NOP_AUTH_ROLE_NAME unique (ROLE_NAME),
constraint PK_nop_auth_role primary key (ROLE_ID)
Expand All @@ -57,9 +57,9 @@ CREATE TABLE nop_auth_site(
CONFIG_VERSION VARCHAR(20) NULL COMMENT '配置版本',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_site primary key (SITE_ID)
);
Expand All @@ -75,9 +75,9 @@ CREATE TABLE nop_auth_role_data_auth(
DEL_FLAG TINYINT NULL COMMENT '删除标识',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_role_data_auth primary key (SID)
);
Expand All @@ -91,9 +91,9 @@ CREATE TABLE nop_auth_tenant(
DEL_FLAG TINYINT NULL COMMENT '删除标识',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_tenant primary key (TENANT_ID)
);
Expand Down Expand Up @@ -131,9 +131,9 @@ CREATE TABLE nop_auth_user(
VERSION INTEGER NOT NULL COMMENT '数据版本',
TENANT_ID VARCHAR(32) NOT NULL COMMENT '租户ID',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint UK_NOP_AUTH_USER_NAME unique (USER_NAME),
constraint PK_nop_auth_user primary key (USER_ID)
Expand Down Expand Up @@ -164,9 +164,9 @@ CREATE TABLE nop_auth_resource(
DEL_FLAG TINYINT NOT NULL COMMENT '删除标识',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_resource primary key (RESOURCE_ID)
);
Expand All @@ -178,14 +178,14 @@ CREATE TABLE nop_auth_ext_login(
EXT_ID VARCHAR(50) NOT NULL COMMENT '登录标识',
CREDENTIAL VARCHAR(50) NULL COMMENT '登录密码',
VERIFIED BOOLEAN NOT NULL COMMENT '是否已验证',
LAST_LOGIN_TIME TIMESTAMP NULL COMMENT '上次登录时间',
LAST_LOGIN_TIME TIMESTAMP(3) NULL COMMENT '上次登录时间',
LAST_LOGIN_IP VARCHAR(20) NULL COMMENT '上次登录IP',
DEL_FLAG TINYINT NOT NULL COMMENT '删除标识',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_ext_login primary key (SID)
);
Expand All @@ -195,9 +195,9 @@ CREATE TABLE nop_auth_user_role(
ROLE_ID VARCHAR(50) NOT NULL COMMENT '角色ID',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_user_role primary key (USER_ID,ROLE_ID)
);
Expand All @@ -211,9 +211,9 @@ CREATE TABLE nop_auth_user_substitution(
END_TIME DATETIME NULL COMMENT '结束时间',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_user_substitution primary key (SID)
);
Expand All @@ -227,17 +227,17 @@ CREATE TABLE nop_auth_session(
LOGIN_DEVICE VARCHAR(100) NULL COMMENT '登录设备',
LOGIN_APP VARCHAR(100) NULL COMMENT '应用程序',
LOGIN_OS VARCHAR(100) NULL COMMENT '操作系统',
LOGIN_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '登录时间',
LOGIN_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '登录时间',
LOGIN_TYPE INTEGER NOT NULL COMMENT '登录方式',
LOGOUT_TIME TIMESTAMP NULL COMMENT '退出时间',
LOGOUT_TIME TIMESTAMP(3) NULL COMMENT '退出时间',
LOGOUT_TYPE INTEGER NOT NULL COMMENT '退出方式',
LOGOUT_BY VARCHAR(100) NULL COMMENT '退出操作人',
LAST_ACCESS_TIME DATETIME NULL COMMENT '最后访问时间',
ACCESS_TOKEN VARCHAR(500) NULL COMMENT '访问令牌',
REFRESH_TOKEN VARCHAR(500) NULL COMMENT '刷新令牌',
CACHE_DATA VARCHAR(4000) NULL COMMENT '缓存数据',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_session primary key (SESSION_ID)
);
Expand All @@ -250,9 +250,9 @@ CREATE TABLE nop_auth_group(
DEL_FLAG TINYINT NULL COMMENT '删除标识',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_group primary key (GROUP_ID)
);
Expand All @@ -264,9 +264,9 @@ CREATE TABLE nop_auth_role_resource(
DEL_FLAG TINYINT NULL COMMENT '删除标识',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_role_resource primary key (SID)
);
Expand All @@ -278,7 +278,7 @@ CREATE TABLE nop_auth_op_log(
SESSION_ID VARCHAR(100) NULL COMMENT '会话ID',
OPERATION VARCHAR(800) NULL COMMENT '业务操作',
DESCRIPTION VARCHAR(2000) NULL COMMENT '操作描述',
ACTION_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间',
ACTION_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '操作时间',
USED_TIME BIGINT NOT NULL COMMENT '操作时长',
RESULT_STATUS INTEGER NOT NULL COMMENT '操作状态',
ERROR_CODE VARCHAR(200) NULL COMMENT '错误码',
Expand All @@ -294,9 +294,9 @@ CREATE TABLE nop_auth_group_dept(
INCLUDE_CHILD TINYINT NOT NULL default '0' COMMENT '是否包含下级',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_group_dept primary key (DEPT_ID,GROUP_ID)
);
Expand All @@ -306,9 +306,9 @@ CREATE TABLE nop_auth_group_user(
GROUP_ID VARCHAR(50) NOT NULL COMMENT '分组ID',
VERSION INTEGER NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_auth_group_user primary key (USER_ID,GROUP_ID)
);
Expand Down
22 changes: 11 additions & 11 deletions nop-batch/deploy/sql/mysql/_create_nop-batch.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ CREATE TABLE nop_batch_file(
ACCEPT_DATE DATE NOT NULL COMMENT '文件接收时间',
VERSION BIGINT NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_batch_file primary key (SID)
);
Expand All @@ -23,8 +23,8 @@ CREATE TABLE nop_batch_task(
TASK_NAME VARCHAR(50) NOT NULL COMMENT '任务名',
TASK_KEY VARCHAR(100) NOT NULL COMMENT '唯一Key',
TASK_STATUS INTEGER NOT NULL COMMENT '任务状态',
START_TIME TIMESTAMP NULL COMMENT '任务启动时间',
END_TIME TIMESTAMP NULL COMMENT '任务结束时间',
START_TIME TIMESTAMP(3) NULL COMMENT '任务启动时间',
END_TIME TIMESTAMP(3) NULL COMMENT '任务结束时间',
TASK_PARAMS VARCHAR(4000) NULL COMMENT '任务参数',
WORKER VARCHAR(100) NOT NULL COMMENT '执行者',
INPUT_FILE_ID VARCHAR(32) NULL COMMENT '输入文件',
Expand All @@ -40,9 +40,9 @@ CREATE TABLE nop_batch_task(
SKIP_COUNT BIGINT NULL COMMENT '跳过数量',
VERSION BIGINT NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
REMARK VARCHAR(200) NULL COMMENT '备注',
constraint PK_nop_batch_task primary key (SID)
);
Expand All @@ -55,12 +55,12 @@ CREATE TABLE nop_batch_task_state(
DECIMAL_VALUE DECIMAL(30,6) NULL COMMENT '浮点值',
LONG_VALUE BIGINT NULL COMMENT '整数型',
DATE_VALUE DATE NULL COMMENT '日期值',
TIMESTAMP_VALUE TIMESTAMP NULL COMMENT '时间点值',
TIMESTAMP_VALUE TIMESTAMP(3) NULL COMMENT '时间点值',
VERSION BIGINT NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
constraint PK_nop_batch_task_state primary key (TASK_ID,FIELD_NAME)
);

Expand All @@ -73,9 +73,9 @@ CREATE TABLE nop_batch_record_result(
ERROR_STACK VARCHAR(4000) NULL COMMENT '错误堆栈',
VERSION BIGINT NOT NULL COMMENT '数据版本',
CREATED_BY VARCHAR(50) NOT NULL COMMENT '创建人',
CREATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
CREATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '创建时间',
UPDATED_BY VARCHAR(50) NOT NULL COMMENT '修改人',
UPDATE_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
UPDATE_TIME TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) COMMENT '修改时间',
constraint PK_nop_batch_record_result primary key (TASK_ID,RECORD_KEY)
);

Expand Down
4 changes: 4 additions & 0 deletions nop-core/src/main/java/io/nop/core/module/ModuleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ public void updateDynamicModules(Map<String, ModuleModel> dynamicModules) {
this.dynamicModules.set(dynamicModules);
}

public Collection<ModuleModel> getEnabledModules() {
return getEnabledModules(true);
}

public Collection<ModuleModel> getEnabledModules(boolean includeTenant) {
return getEnabledModuleMap(includeTenant).values();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<sqlDataType name="DATE" stdSqlType="DATE"/>
<sqlDataType name="TIME" stdSqlType="TIME"/>
<sqlDataType name="DATETIME" stdSqlType="DATETIME"/>
<sqlDataType name="TIMESTAMP" stdSqlType="TIMESTAMP"/>
<sqlDataType name="TIMESTAMP" code="TIMESTAMP(3)" stdSqlType="TIMESTAMP"/>
<sqlDataType name="REAL" stdSqlType="REAL" alias="FLOAT"/>
<sqlDataType name="DOUBLE" stdSqlType="DOUBLE" alias="DOUBLE PRECISION"/>
<sqlDataType name="DECIMAL" stdSqlType="DECIMAL"/>
Expand Down
Loading

0 comments on commit f4de087

Please sign in to comment.