Commit 82ee3099 authored by 陈志良's avatar 陈志良

修改

parent 31a1ed77
......@@ -2397,7 +2397,7 @@ router.get('/thread/:tid/get/subThreads/:type', function(req, res, next) {
function(callback) {
var getByConditionsSelectyFieldBegin = new Date();
forumThreadService.getByConditionsSelectyField({_id:tid}, 'type', function(err, thread) {
console.log("获取父帖子耗时:"+ Math.asb(new Date() - getByConditionsSelectyFieldBegin));
console.log("获取父帖子耗时:"+ Math.abs(new Date() - getByConditionsSelectyFieldBegin));
if (err) {
console.error(err);
callback(err, null);
......@@ -2419,7 +2419,7 @@ router.get('/thread/:tid/get/subThreads/:type', function(req, res, next) {
var getThreadWithNotPopulateCommentBegin = new Date();
//获取子话题数据
forumThreadService.getThreadWithNotPopulateComment(conditions, pageNo, pageSize, sort, function(err, results) {
console.log("查询子帖子列表耗时:"+Math.asb(new Date() - getThreadWithNotPopulateCommentBegin));
console.log("查询子帖子列表耗时:"+Math.abs(new Date() - getThreadWithNotPopulateCommentBegin));
if (err) {
console.error(err);
callback(err, null);
......@@ -2439,10 +2439,10 @@ router.get('/thread/:tid/get/subThreads/:type', function(req, res, next) {
if(results){
var loadLevelBegin = new Date();
util.loadLevel(ent_code, results.items, function() {
console.log("查询用户经验耗时:"+Math.asb(new Date() - loadLevelBegin));
console.log("查询用户经验耗时:"+Math.abs(new Date() - loadLevelBegin));
var handleThreadListBegin = new Date();
handleThreadList(req, results, ent_code, function(result){
console.log("查询用户对帖子点赞耗时:"+Math.asb(new Date() - handleThreadListBegin));
console.log("查询用户对帖子点赞耗时:"+Math.abs(new Date() - handleThreadListBegin));
redis.set(key, _.assign(result, returnCode.SUCCESS));
redis.expire(key, 2);
res.json(_.assign(result, returnCode.SUCCESS));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment