Commit 5b0235e3 authored by 不如归去's avatar 不如归去 Committed by GitHub

Fix dual monthly pt reduce

parent 25ccc166
...@@ -108,14 +108,15 @@ var j = schedule.scheduleJob('0 0 0 1 * *', function () { ...@@ -108,14 +108,15 @@ var j = schedule.scheduleJob('0 0 0 1 * *', function () {
let sql = `update user_info set pt = (pt - (pt - 1000) * 0.5 ) let sql = `update user_info set pt = (pt - (pt - 1000) * 0.5 )
where pt > 1000`; where pt > 1000`;
client.query(sql, function (err, result) { // Monthly pt reduce will be done in function monthly_user_historical_record()
done(); //client.query(sql, function (err, result) {
if (err) { // done();
return console.error('error running monthly scheduleJob', err); // if (err) {
} // return console.error('error running monthly scheduleJob', err);
console.log(result) // }
}); // console.log(result)
//});
}) })
let time = moment().subtract(1, 'month'); let time = moment().subtract(1, 'month');
......
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