Commit efbcc8e7 authored by 陈家荣's avatar 陈家荣

444

parent 08c764f6
......@@ -47,23 +47,24 @@ router.post('/limitActionRef/createOrUpdate', function(req, res, next) {
console.error(err);
res.json(returnCode.BUSY);
}
for (var i in selects) {
for (var j in results) {
if (selects[i] === results[j]._id.toString()) {
var begin_time = moment(new Date()).format('YYYY-MM-DD');
var end_time = moment(new Date()).add(results[j].limit_time, 'days').format('YYYY-MM-DD');
var obj = {
limit_action: selects[i],
limit_action_type: results[j].limit_action_type,
begin_time: begin_time,
end_time: end_time
if(selects && results){
for (var i = 0; i < selects.length; i+=1) {
for(var j = 0; j < results.length; j+=1){
if (selects[i] === results[j]._id.toString()) {
var begin_time = moment(new Date()).format('YYYY-MM-DD');
var end_time = moment(new Date()).add(results[j].limit_time, 'days').format('YYYY-MM-DD');
var obj = {
limit_action: selects[i],
limit_action_type: results[j].limit_action_type,
begin_time: begin_time,
end_time: end_time
}
limit_actions.push(obj);
break;
}
limit_actions.push(obj);
break;
}
}
}
var forumLimitActionRef = {
ent_code: ent_code,
mid: mid,
......
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