diff --git a/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/DeviceLogMapper.xml b/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/DeviceLogMapper.xml index a89b0538..88eb821a 100644 --- a/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/DeviceLogMapper.xml +++ b/springboot/fastbee-service/fastbee-iot-service/src/main/resources/mapper/iot/DeviceLogMapper.xml @@ -91,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and tenant_id = #{tenantId} ) as monitorCount - limit 1 + diff --git a/springboot/sql/dameng/fastbee-v2.1.sql b/springboot/sql/dameng/fastbee-v2.1.sql index e0e98c3a..0c68f4c0 100644 --- a/springboot/sql/dameng/fastbee-v2.1.sql +++ b/springboot/sql/dameng/fastbee-v2.1.sql @@ -136,7 +136,8 @@ CREATE TABLE "SYS_OPER_LOG" NULL, "ERROR_MSG" VARCHAR(2000) DEFAULT '' NULL, - "OPER_TIME" TIMESTAMP(0) NULL + "OPER_TIME" TIMESTAMP(0) NULL, + "COST_TIME" INT DEFAULT 0, ); CREATE TABLE "SYS_POST" ( diff --git a/springboot/sql/oracle/fastbee-v2.1.sql b/springboot/sql/oracle/fastbee-v2.1.sql index 61e5fd22..9a8cb443 100644 --- a/springboot/sql/oracle/fastbee-v2.1.sql +++ b/springboot/sql/oracle/fastbee-v2.1.sql @@ -3368,7 +3368,8 @@ CREATE TABLE "sys_oper_log" ( "json_result" NCLOB, "status" NUMBER(11), "error_msg" NCLOB, - "oper_time" DATE + "oper_time" DATE, + "cost_time" NUMBER(20) DEFAULT 0 ) ; COMMENT ON COLUMN "sys_oper_log"."oper_id" IS '操作日志ID'; @@ -3387,6 +3388,7 @@ COMMENT ON COLUMN "sys_oper_log"."json_result" IS '返回参数'; COMMENT ON COLUMN "sys_oper_log"."status" IS '操作状态(0正常 1异常)'; COMMENT ON COLUMN "sys_oper_log"."error_msg" IS '错误消息'; COMMENT ON COLUMN "sys_oper_log"."oper_time" IS '操作时间'; +COMMENT ON COLUMN "sys_oper_log"."cost_time" IS '消耗时间'; COMMENT ON TABLE "sys_oper_log" IS '操作日志记录'; -- ---------------------------- diff --git a/springboot/sql/postgres/fastbee-v2.1.sql b/springboot/sql/postgres/fastbee-v2.1.sql index 85c83464..ce9142c1 100644 --- a/springboot/sql/postgres/fastbee-v2.1.sql +++ b/springboot/sql/postgres/fastbee-v2.1.sql @@ -3368,7 +3368,8 @@ CREATE TABLE "public"."sys_oper_log" ( "json_result" varchar(2000), "status" int4, "error_msg" varchar(2000), - "oper_time" timestamp + "oper_time" timestamp, + "cost_time" int8 default 0 ) ; COMMENT ON COLUMN "public"."sys_oper_log"."oper_id" IS '操作日志ID'; @@ -3387,6 +3388,7 @@ COMMENT ON COLUMN "public"."sys_oper_log"."json_result" IS '返回参数'; COMMENT ON COLUMN "public"."sys_oper_log"."status" IS '操作状态(0正常 1异常)'; COMMENT ON COLUMN "public"."sys_oper_log"."error_msg" IS '错误消息'; COMMENT ON COLUMN "public"."sys_oper_log"."oper_time" IS '操作时间'; +COMMENT ON COLUMN "public"."sys_oper_log"."cost_time" IS '消耗时间'; COMMENT ON TABLE "public"."sys_oper_log" IS '操作日志记录'; -- ---------------------------- diff --git a/springboot/sql/sqlserver/fastbee-v2.1.sql b/springboot/sql/sqlserver/fastbee-v2.1.sql index 40d3ddd2..678271d7 100644 --- a/springboot/sql/sqlserver/fastbee-v2.1.sql +++ b/springboot/sql/sqlserver/fastbee-v2.1.sql @@ -7750,7 +7750,8 @@ CREATE TABLE [dbo].[sys_oper_log] ( [json_result] nvarchar(2000) NULL, [status] int NULL, [error_msg] nvarchar(2000) NULL, - [oper_time] datetime2 NULL + [oper_time] datetime2 NULL, + [cost_time] int default 0 ) GO @@ -7866,6 +7867,13 @@ EXEC sp_addextendedproperty 'COLUMN', N'oper_time' GO +EXEC sp_addextendedproperty +'MS_Description', N'消耗时间', +'SCHEMA', N'dbo', +'TABLE', N'sys_oper_log', +'COLUMN', N'cost_time' +GO + EXEC sp_addextendedproperty 'MS_Description', N'操作日志记录', 'SCHEMA', N'dbo',