update: fix sql

This commit is contained in:
tokumeikoi 2022-03-11 01:12:49 +08:00
parent d42c271942
commit 1e9c16543d
4 changed files with 10 additions and 6 deletions

View File

@ -71,12 +71,12 @@ class StatController extends Controller
'value' => $statistic['order_count']
]);
array_push($result, [
'type' => '佣金金额',
'type' => '佣金金额(已发放)',
'date' => $date,
'value' => $statistic['commission_amount'] / 100
]);
array_push($result, [
'type' => '佣金笔数',
'type' => '佣金笔数(已发放)',
'date' => $date,
'value' => $statistic['commission_count']
]);

View File

@ -277,8 +277,8 @@ CREATE TABLE `v2_stat_server` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`server_id` int(11) NOT NULL COMMENT '节点id',
`server_type` char(11) NOT NULL COMMENT '节点类型',
`u` varchar(255) NOT NULL,
`d` varchar(255) NOT NULL,
`u` bigint(20) NOT NULL,
`d` bigint(20) NOT NULL,
`record_type` char(1) NOT NULL COMMENT 'd day m month',
`record_at` int(11) NOT NULL COMMENT '记录时间',
`created_at` int(11) NOT NULL,
@ -374,4 +374,4 @@ CREATE TABLE `v2_user` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- 2022-03-04 16:25:43
-- 2022-03-10 15:45:02

View File

@ -513,3 +513,7 @@ ALTER TABLE `v2_stat_user`
ADD INDEX `server_id` (`server_id`),
ADD INDEX `user_id` (`user_id`),
ADD INDEX `record_at` (`record_at`);
ALTER TABLE `v2_stat_server`
CHANGE `u` `u` bigint NOT NULL AFTER `server_type`,
CHANGE `d` `d` bigint NOT NULL AFTER `u`;

File diff suppressed because one or more lines are too long