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
db8e9e92
Commit
db8e9e92
authored
Dec 11, 2015
by
strong
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
c0bb2364
' into SANDBOX
parents
df07ab6a
c0bb2364
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
77 deletions
+14
-77
forumUserService.js
app/service/forumUserService.js
+14
-77
No files found.
app/service/forumUserService.js
View file @
db8e9e92
...
...
@@ -197,81 +197,18 @@ exports.searchMembersAndLimitActions=function(pageNo, pageSize, q, callback){
});
};
//查询用户和行为限制信息
// exports.searchMembersAndLimitActions=function(pageNo, pageSize, q, callback){
// then(function(cont) {
// ForumUser.find(q).count(cont);
// }).then(function(cont, count) {
// var skip = (pageNo - 1) * pageSize;
// var limit = count - skip > pageSize ? pageSize : (count - skip);
// ForumUser.find(q).skip(skip).limit(limit).sort('-created').exec(function(err, docs) {
// cont(err, count, docs);
// });
// }).then(function(cont, count, members) {
// forumLimitActionConfigService.getAllLimitActionConfig(function(err, configs) {
// cont(err, count, members, configs);
// });
// }).then(function(cont, count, members, configs) {
// if (count > 0 && configs.length > 0) {
// var asyncTasks = [];
// members.forEach(function(member) {
// asyncTasks.push(function(callback) {
// forumLimitActionRefService.getLimitActionRefByMIdAndEntCode(member._id, member.ent_code, function(err, forumLimitActionRef) {
// if (err) {
// console.error(err);
// callback(null, null);
// } else {
// if(forumLimitActionRef){
// var limit_actions = forumLimitActionRef.limit_actions;
// var array = [];
// for (var i = 0; i < limit_actions.length; i += 1) {
// var limit_action = limit_actions[i];
// for(var k = 0; k < configs.length; k+=1){
// if(limit_action.limit_action_type === configs[k].code){
// array.push(configs[k].name);
// break;
// }
// }
// }
// member = member.toObject();
// member.limitActions = array;
// callback(null, member);
// }else{
// callback(null, member);
// }
// }
// });
// });
// });
// async.parallel(asyncTasks, function(err, results) {
// if (err) {
// console.log(err);
// callback(null, null);
// } else {
// // callback(null, results);
// var rsJson = {
// result: true,
// total: count,
// datas: results
// };
// callback(null, rsJson);
// }
// });
// } else {
// var rsJson = {
// result: true,
// total: count,
// datas: members
// };
// callback(null, rsJson);
// }
// }).fail(function(cont, err) {
// console.error(err);
// var rsJson = {
// result: false,
// err: err
// };
// callback(err, rsJson);
// });
// };
//根据UID和entCode更新用户信息
exports
.
updateUserByUIdAndEntCode
=
function
(
uid
,
ent_code
,
entity
,
callback
){
ForumUser
.
update
({
uid
:
uid
,
ent_code
:
ent_code
},
entity
,
null
,
function
(
err
,
result
){
if
(
err
)
{
console
.
error
(
err
);
callback
(
err
,
null
);
}
else
{
callback
(
null
,
null
);
}
});
};
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