From 8875a494864341ff19fe6f5d3ca8a1617a1cf3fd Mon Sep 17 00:00:00 2001 From: wangliwen Date: Tue, 3 Jan 2023 15:11:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=95=B0=E6=8D=AE=E5=BF=AB?= =?UTF-8?q?=E7=85=A7=E6=95=B0=E6=8D=AE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/controller/CensusController.java | 17 +++++++++++++++++ .../db/V8.7__add_sys_date_snapshot.sql | 18 ++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 renren-admin/src/main/resources/db/V8.7__add_sys_date_snapshot.sql diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java index e80b30c9..703009a8 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java @@ -637,4 +637,21 @@ public class CensusController { return list; } + // TODO 同比环比 + @GetMapping("/similitude") + @ApiOperation("资源数量环比") + @LogOperation("资源数量环比") + @ApiImplicitParams({}) + public Result similitude() { + return new Result(); + } + + @GetMapping("/similitude_dept") + @ApiOperation("部门资源数量环比") + @LogOperation("部门资源数量环比") + @ApiImplicitParams({}) + public Result similitudeDept() { + return new Result(); + } + } diff --git a/renren-admin/src/main/resources/db/V8.7__add_sys_date_snapshot.sql b/renren-admin/src/main/resources/db/V8.7__add_sys_date_snapshot.sql new file mode 100644 index 00000000..b8dfecf8 --- /dev/null +++ b/renren-admin/src/main/resources/db/V8.7__add_sys_date_snapshot.sql @@ -0,0 +1,18 @@ +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for sys_date_snapshot +-- ---------------------------- +DROP TABLE IF EXISTS `sys_date_snapshot`; +CREATE TABLE `sys_date_snapshot` ( + `id` bigint NOT NULL COMMENT '主键', + `type` int NULL DEFAULT NULL COMMENT '数据快照类型(1:每周快照 2:每月快照)', + `creator` bigint NULL DEFAULT NULL COMMENT '创建人', + `create_date` datetime NOT NULL COMMENT '创建时间', + `snapshot` json NOT NULL COMMENT '数据快照内容', + PRIMARY KEY (`id`) USING BTREE, + INDEX `type`(`type` ASC) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '运行数据快照(资源数量、申请数量)' ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1;