新增【流量统计-天】报表后端逻辑

This commit is contained in:
aoshiguchen
2022-11-01 10:01:54 +08:00
parent 8fce7d1677
commit aadee74d8e
6 changed files with 241 additions and 6 deletions
@@ -158,7 +158,7 @@ CREATE TABLE IF NOT EXISTS `flow_report_hour` (
`date` INTEGER(20) NOT NULL,
`date_str` VARCHAR(20) NOT NULL,
`create_time` INTEGER(20) NOT NULL
);
);
CREATE INDEX IF NOT EXISTS I_flow_report_hour_create_time ON flow_report_hour(create_time);
CREATE INDEX IF NOT EXISTS I_flow_report_hour_date ON flow_report_hour(`date`);
CREATE INDEX IF NOT EXISTS I_flow_report_hour_user_id ON flow_report_hour(`user_id`);
@@ -174,7 +174,7 @@ CREATE TABLE IF NOT EXISTS `flow_report_day` (
`date` INTEGER(20) NOT NULL,
`date_str` VARCHAR(20) NOT NULL,
`create_time` INTEGER(20) NOT NULL
);
);
CREATE INDEX IF NOT EXISTS I_flow_report_day_create_time ON flow_report_day(create_time);
CREATE INDEX IF NOT EXISTS I_flow_report_day_date ON flow_report_day(`date`);
CREATE INDEX IF NOT EXISTS I_flow_report_day_user_id ON flow_report_day(`user_id`);
@@ -190,7 +190,7 @@ CREATE TABLE IF NOT EXISTS `flow_report_month` (
`date` INTEGER(20) NOT NULL,
`date_str` VARCHAR(20) NOT NULL,
`create_time` INTEGER(20) NOT NULL
);
);
CREATE INDEX IF NOT EXISTS I_flow_report_month_create_time ON flow_report_month(create_time);
CREATE INDEX IF NOT EXISTS I_flow_report_month_date ON flow_report_month(`date`);
CREATE INDEX IF NOT EXISTS I_flow_report_month_user_id ON flow_report_month(`user_id`);
@@ -6,4 +6,6 @@ INSERT INTO job_info(`id`, `desc`, `handler`, `cron`, `param`, `enable`, `create
INSERT INTO job_info(`id`, `desc`, `handler`, `cron`, `param`, `enable`, `create_time`, `update_time`) VALUES
(3, '流量统计报表-分钟', 'FlowReportForMinuteJob', '0 */1 * * * ?', '', 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW'));
INSERT INTO job_info(`id`, `desc`, `handler`, `cron`, `param`, `enable`, `create_time`, `update_time`) VALUES
(4, '流量统计报表-小时', 'FlowReportForHourJob', '0 0 */1 * * ?', '', 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW'));
(4, '流量统计报表-小时', 'FlowReportForHourJob', '0 0 */1 * * ?', '', 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW'));
INSERT INTO job_info(`id`, `desc`, `handler`, `cron`, `param`, `enable`, `create_time`, `update_time`) VALUES
(5, '流量统计报表-天', 'FlowReportForDayJob', '0 0 1 * * ?', '', 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW'));