Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
php_frq_api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cffeceaa
authored
Mar 10, 2021
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调整报价统计
parent
afcbe111
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
app/Model/QuoteModel.php
app/Model/QuoteModel.php
View file @
cffeceaa
...
@@ -530,7 +530,7 @@ class QuoteModel extends Model
...
@@ -530,7 +530,7 @@ class QuoteModel extends Model
$start_time
=
$curr_zero_time
+
$i
*
3600
;
$start_time
=
$curr_zero_time
+
$i
*
3600
;
$end_time
=
$start_time
+
3600
;
$end_time
=
$start_time
+
3600
;
$data
[
'today_quote'
][]
=
$this
->
getTodayQoutCount
(
$input
,
$start_time
);
$data
[
'today_quote'
][]
=
$this
->
getTodayQoutCount
(
$input
,
$start_time
,
$end_time
);
$data
[
'today_no_quote'
][]
=
$this
->
getTodayNoQoutCount
(
$input
,
$start_time
,
$end_time
);
$data
[
'today_no_quote'
][]
=
$this
->
getTodayNoQoutCount
(
$input
,
$start_time
,
$end_time
);
$data
[
'x_axis_data'
][]
=
$i
.
'点'
;
$data
[
'x_axis_data'
][]
=
$i
.
'点'
;
}
}
...
@@ -541,7 +541,7 @@ class QuoteModel extends Model
...
@@ -541,7 +541,7 @@ class QuoteModel extends Model
$start_time
=
$curr_zero_time
-
$i
*
86400
;
$start_time
=
$curr_zero_time
-
$i
*
86400
;
$end_time
=
$start_time
+
86399
;
$end_time
=
$start_time
+
86399
;
$data
[
'today_quote'
][]
=
$this
->
getTodayQoutCount
(
$input
,
$start_time
);
$data
[
'today_quote'
][]
=
$this
->
getTodayQoutCount
(
$input
,
$start_time
,
$end_time
);
$data
[
'today_no_quote'
][]
=
$this
->
getTodayNoQoutCount
(
$input
,
$start_time
,
$end_time
);
$data
[
'today_no_quote'
][]
=
$this
->
getTodayNoQoutCount
(
$input
,
$start_time
,
$end_time
);
$data
[
'x_axis_data'
][]
=
date
(
'Y-m-d'
,
$curr_zero_time
-
$i
*
86400
);
$data
[
'x_axis_data'
][]
=
date
(
'Y-m-d'
,
$curr_zero_time
-
$i
*
86400
);
}
}
...
@@ -552,7 +552,7 @@ class QuoteModel extends Model
...
@@ -552,7 +552,7 @@ class QuoteModel extends Model
$start_time
=
$curr_zero_time
-
$i
*
86400
;
$start_time
=
$curr_zero_time
-
$i
*
86400
;
$end_time
=
$start_time
+
86399
;
$end_time
=
$start_time
+
86399
;
$data
[
'today_quote'
][]
=
$this
->
getTodayQoutCount
(
$input
,
$start_time
);
$data
[
'today_quote'
][]
=
$this
->
getTodayQoutCount
(
$input
,
$start_time
,
$end_time
);
$data
[
'today_no_quote'
][]
=
$this
->
getTodayNoQoutCount
(
$input
,
$start_time
,
$end_time
);
$data
[
'today_no_quote'
][]
=
$this
->
getTodayNoQoutCount
(
$input
,
$start_time
,
$end_time
);
$data
[
'x_axis_data'
][]
=
date
(
'Y-m-d'
,
$curr_zero_time
-
$i
*
86400
);
$data
[
'x_axis_data'
][]
=
date
(
'Y-m-d'
,
$curr_zero_time
-
$i
*
86400
);
}
}
...
@@ -564,9 +564,9 @@ class QuoteModel extends Model
...
@@ -564,9 +564,9 @@ class QuoteModel extends Model
}
}
// 当日报价数
// 当日报价数
public
function
getTodayQoutCount
(
$input
,
$start_time
)
public
function
getTodayQoutCount
(
$input
,
$start_time
,
$end_time
)
{
{
return
$this
->
where
(
'create_uid'
,
$input
[
'user_id'
])
->
where
(
'create_time'
,
'>='
,
$start_time
)
->
count
();
return
$this
->
where
(
'create_uid'
,
$input
[
'user_id'
])
->
where
Between
(
'create_time'
,
[
$start_time
,
$end_time
]
)
->
count
();
}
}
// 当日未报价数
// 当日未报价数
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment