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;