You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
3.5 KiB
Java

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

--
CREATE TABLE trade_statistics
(
id bigint AUTO_INCREMENT COMMENT ''
PRIMARY KEY,
time datetime NOT NULL COMMENT '',
order_create_count int DEFAULT 0 NOT NULL COMMENT '',
order_pay_count int DEFAULT 0 NOT NULL COMMENT '',
order_pay_price int DEFAULT 0 NOT NULL COMMENT '',
order_wallet_pay_price int DEFAULT 0 NOT NULL COMMENT '',
after_sale_count int DEFAULT 0 NOT NULL COMMENT '退',
after_sale_refund_price int DEFAULT 0 NOT NULL COMMENT '退',
brokerage_settlement_price int DEFAULT 0 NOT NULL COMMENT '',
recharge_pay_count int DEFAULT 0 NOT NULL COMMENT '',
recharge_pay_price int DEFAULT 0 NOT NULL COMMENT '',
recharge_refund_count int DEFAULT 0 NOT NULL COMMENT '退',
recharge_refund_price int DEFAULT 0 NOT NULL COMMENT '退',
creator varchar(64) DEFAULT '' NULL COMMENT '',
create_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '',
updater varchar(64) DEFAULT '' NULL COMMENT '',
update_time datetime DEFAULT CURRENT_TIMESTAMP NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '',
deleted bit DEFAULT b'0' NOT NULL COMMENT '',
tenant_id bigint DEFAULT 0 NOT NULL COMMENT ''
)
COMMENT '';
CREATE INDEX trade_statistics_time_index
ON trade_statistics (time);
--
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name)
VALUES ('', '', 1, 4, 0, '/statistics', 'ep:data-line', '', '');
SELECT @parentId := LAST_INSERT_ID();
--
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name)
VALUES ('', '', 2, 1, @parentId, 'trade', 'fa-solid:credit-card', 'statistics/trade/index', 'TradeStatistics');
SELECT @parentId := LAST_INSERT_ID();
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
VALUES ('', 'statistics:trade:query', 3, 1, @parentId, '', '', '', 0);
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
VALUES ('', 'statistics:trade:export', 3, 2, @parentId, '', '', '', 0);
--
INSERT INTO system_menu (name, permission, type, sort, parent_id, path, icon, component, component_name)
VALUES ('', '', 2, 2, @parentId, 'member', 'ep:avatar', 'statistics/member/index', 'MemberStatistics');
SELECT @parentId := LAST_INSERT_ID();
INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status)
VALUES ('', 'statistics:member:query', 3, 1, @parentId, '', '', '', 0);