Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pisns-forum-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
scrmGroup
pisns-forum-api
Commits
6dbe6a4c
Commit
6dbe6a4c
authored
Sep 29, 2015
by
陈家荣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改查询社区情况接口
parent
9d6180a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
forumLog.js
app/controllers/admin/forumLog.js
+11
-4
No files found.
app/controllers/admin/forumLog.js
View file @
6dbe6a4c
...
...
@@ -581,8 +581,9 @@ router.post('/getThreadSexStatistic', function(req, res, next) {
//社区情况(首页_第二版)
router
.
get
(
'/statistic_v2'
,
function
(
req
,
res
,
next
)
{
var
yesterday
=
moment
(
new
Date
().
getTime
()
-
24
*
3600
*
1000
).
format
(
'YYYY-MM-DD'
),
before_yesterday
=
moment
(
new
Date
().
getTime
()
-
2
*
24
*
3600
*
1000
).
format
(
'YYYY-MM-DD'
);
var
yesterday
=
moment
(
new
Date
(
req
.
query
.
day
)).
format
(
'YYYY-MM-DD'
),
before_yesterday
=
moment
(
new
Date
(
req
.
query
.
day
).
getTime
()
-
1
*
24
*
3600
*
1000
).
format
(
'YYYY-MM-DD'
);
var
ent_code
=
req
.
query
.
ent_code
,
y_begin
=
new
Date
(
yesterday
),
//昨天开始时间
y_end
=
new
Date
(
yesterday
+
' 23:59:59'
),
//昨天结束时间
...
...
@@ -652,7 +653,10 @@ router.get('/statistic_v2', function(req, res, next) {
function
(
cont
)
{
//总访问用户
var
match
=
{
ent_code
:
ent_code
ent_code
:
ent_code
,
created
:{
$lte
:
y_end
}
};
aggregate
(
ForumUvLog
,
match
,
{
mid
:
'$mid'
...
...
@@ -665,7 +669,10 @@ router.get('/statistic_v2', function(req, res, next) {
function
(
cont
)
{
//总发帖数
var
match
=
{
ent_code
:
ent_code
ent_code
:
ent_code
,
created
:
{
$lte
:
y_end
}
};
ForumThread
.
count
(
match
,
function
(
err
,
count
)
{
cont
(
err
,
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