供应商和租赁账户首页不合理,帮我重新设计,应该是包含各自角色相关的统计图表信息,和监控状态信息。
This commit is contained in:
1 parent
8dcb313454
commit
02dd5668d5
7 files changed
+383
No files matched your search
@@ -0,0 +1,19 @@
|
||||
-- 角色看板的可选性能升级;不修改业务数据,不影响旧接口。
|
||||
-- MySQL DDL会隐式提交,建议维护窗口执行;按索引名检查,可重复执行。
|
||||
SET @rent_dashboard_ddl = IF(
|
||||
EXISTS(SELECT 1 FROM information_schema.statistics WHERE table_schema=DATABASE()
|
||||
AND table_name='rent_order' AND index_name='idx_order_supplier_dashboard'),
|
||||
'SELECT 1',
|
||||
'ALTER TABLE rent_order ADD INDEX idx_order_supplier_dashboard (supplier_user_id,network,created_at)');
|
||||
PREPARE rent_dashboard_stmt FROM @rent_dashboard_ddl;
|
||||
EXECUTE rent_dashboard_stmt;
|
||||
DEALLOCATE PREPARE rent_dashboard_stmt;
|
||||
|
||||
SET @rent_dashboard_ddl = IF(
|
||||
EXISTS(SELECT 1 FROM information_schema.statistics WHERE table_schema=DATABASE()
|
||||
AND table_name='rent_ledger' AND index_name='idx_ledger_dashboard'),
|
||||
'SELECT 1',
|
||||
'ALTER TABLE rent_ledger ADD INDEX idx_ledger_dashboard (account_id,created_at)');
|
||||
PREPARE rent_dashboard_stmt FROM @rent_dashboard_ddl;
|
||||
EXECUTE rent_dashboard_stmt;
|
||||
DEALLOCATE PREPARE rent_dashboard_stmt;
|
||||
@@ -250,6 +250,7 @@ CREATE TABLE IF NOT EXISTS `rent_order` (
|
||||
KEY `idx_order_dispatch_expire` (`status`,`dispatch_deadline`),
|
||||
KEY `idx_order_reclaim` (`reclaim_status`,`next_reclaim_at`),
|
||||
KEY `idx_order_supplier` (`supplier_account_id`,`status`,`id`),
|
||||
KEY `idx_order_supplier_dashboard` (`supplier_user_id`,`network`,`created_at`),
|
||||
KEY `idx_order_app` (`app_id`,`created_at`)
|
||||
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='能量或带宽租赁订单;一单一种资源一个钱包,履约与回收分开';
|
||||
|
||||
@@ -365,6 +366,7 @@ CREATE TABLE IF NOT EXISTS `rent_ledger` (
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_ledger_business` (`business_key`),
|
||||
KEY `idx_ledger_account` (`account_id`,`id`),
|
||||
KEY `idx_ledger_dashboard` (`account_id`,`created_at`),
|
||||
KEY `idx_ledger_order` (`order_id`,`id`)
|
||||
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='不可变租赁资金流水;余额与流水同事务,冲正追加不覆盖';
|
||||
|
||||
|
||||
Reference in new issue
Block a user