|
|
|
@ -11,7 +11,7 @@
|
|
|
|
|
Target Server Version : 80025 (8.0.25)
|
|
|
|
|
File Encoding : 65001
|
|
|
|
|
|
|
|
|
|
Date: 16/08/2023 17:20:53
|
|
|
|
|
Date: 17/08/2023 16:54:51
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
SET NAMES utf8mb4;
|
|
|
|
@ -1179,7 +1179,7 @@ CREATE TABLE `sys_log` (
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
|
INDEX `token`(`token` ASC) USING BTREE,
|
|
|
|
|
INDEX `create_time`(`create_time` ASC) USING BTREE
|
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 2824 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '行为日志' ROW_FORMAT = DYNAMIC;
|
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '行为日志' ROW_FORMAT = DYNAMIC;
|
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_log
|
|
|
|
@ -1195,7 +1195,7 @@ CREATE TABLE `sys_log_text` (
|
|
|
|
|
`params` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '请求参数',
|
|
|
|
|
`result` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '结果',
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;
|
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;
|
|
|
|
|
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
-- Records of sys_log_text
|
|
|
|
@ -1483,6 +1483,6 @@ INSERT INTO `yszk_transfer` VALUES (1, '2023-08-13 12:20:27', '2023-08-13 12:20:
|
|
|
|
|
-- View structure for user_integral
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP VIEW IF EXISTS `user_integral`;
|
|
|
|
|
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `user_integral` AS select `t10`.`user_id` AS `user_id`,`t10`.`class_id` AS `class_id`,`t10`.`total_integral` AS `integral`,row_number() OVER (ORDER BY `t10`.`total_integral` desc ) AS `integral_order` from (select `t9`.`user_id` AS `user_id`,sum((`t9`.`integral` + `t9`.`ext_integral`)) AS `total_integral`,`t9`.`class_id` AS `class_id` from (select `t2`.`user_id` AS `user_id`,`t3`.`mode` AS `MODE`,`t2`.`class_id` AS `class_id`,sum((50 - (30 * (1 - `t3`.`mode`)))) AS `integral`,sum(distinct `t1`.`flow_id`) AS `flow_id_sum`,(case when (sum(distinct `t1`.`flow_id`) > 14) then (100 * (`t3`.`mode` + 1)) else 0 end) AS `ext_integral` from ((`financings` `t1` join `user_examinations` `t2` on((`t1`.`instance_id` = `t2`.`instance_id`))) join `examinations` `t3` on((`t2`.`examination_id` = `t3`.`id`))) where ((`t1`.`financing_status` = 9) and (`t3`.`mode` is not null) and (`t3`.`type` = 0)) group by `t2`.`user_id`,`t3`.`mode`) `t9` group by `t9`.`user_id`) `t10`;
|
|
|
|
|
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `user_integral` AS select `t10`.`user_id` AS `user_id`,max(`t10`.`class_id`) AS `class_id`,max(`t10`.`total_integral`) AS `integral`,row_number() OVER (ORDER BY `t10`.`total_integral` desc ) AS `integral_order` from (select `t9`.`user_id` AS `user_id`,sum((`t9`.`integral` + `t9`.`ext_integral`)) AS `total_integral`,max(`t9`.`class_id`) AS `class_id` from (select `t2`.`user_id` AS `user_id`,`t3`.`mode` AS `MODE`,`t2`.`class_id` AS `class_id`,sum((50 - (30 * (1 - `t3`.`mode`)))) AS `integral`,sum(distinct `t1`.`flow_id`) AS `flow_id_sum`,(case when (sum(distinct `t1`.`flow_id`) > 14) then (100 * (`t3`.`mode` + 1)) else 0 end) AS `ext_integral` from ((`financings` `t1` join `user_examinations` `t2` on((`t1`.`instance_id` = `t2`.`instance_id`))) join `examinations` `t3` on((`t2`.`examination_id` = `t3`.`id`))) where ((`t1`.`financing_status` = 9) and (`t3`.`mode` is not null) and (`t3`.`type` = 0)) group by `t2`.`user_id`,`t3`.`mode`) `t9` group by `t9`.`user_id`) `t10`;
|
|
|
|
|
|
|
|
|
|
SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|