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
d20ad695
Commit
d20ad695
authored
Jan 20, 2016
by
strong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bugfix_0118_info_delete' into SANDBOX
parents
c0645f67
0e781225
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
floorGenerator.js
app/utils/floorGenerator.js
+4
-4
No files found.
app/utils/floorGenerator.js
View file @
d20ad695
...
...
@@ -2,7 +2,7 @@
var
redis
=
global
.
redis
;
var
prefix
=
'_forum_floor_generator_'
;
var
expire
=
60
*
30
;
//半个小时
var
expire
=
60
*
30
;
//半个小时
var
forumCommentService
=
require
(
'../service/forumCommentService'
);
...
...
@@ -11,8 +11,8 @@ function getKey(entcode,id){
}
/*
获取帖子的评论的楼层
tid:帖子id
获取帖子的评论的楼层
tid:帖子id
*/
exports
.
getCommentFloor
=
function
(
entcode
,
tid
,
callback
){
var
key
=
getKey
(
entcode
,
tid
);
...
...
@@ -33,7 +33,6 @@ exports.getCommentFloor=function(entcode,tid,callback){
return
callback
&&
callback
(
error
,
newfloor
||
1
);
});
}
else
{
//不存在
redis
.
set
(
key
,
0
);
redis
.
watch
(
key
);
var
multi
=
redis
.
multi
();
//获取评论的最新楼层
...
...
@@ -42,6 +41,7 @@ exports.getCommentFloor=function(entcode,tid,callback){
level
:
'1'
},
function
(
err
,
count
)
{
if
(
err
)
{
multi
.
discard
();
return
callback
&&
callback
(
err
);
}
var
newfloor
=
(
count
||
0
)
+
1
;
...
...
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