Commit 10cfe04d authored by Peter Xin's avatar Peter Xin

Clear DP on 1, 4, 7, 10

parent e08af193
Pipeline #18962 passed with stages
in 3 minutes and 46 seconds
...@@ -152,10 +152,11 @@ export class AppService { ...@@ -152,10 +152,11 @@ export class AppService {
.subtract(1, 'day') .subtract(1, 'day')
.format('YYYY-MM-DD 23:59:59'); .format('YYYY-MM-DD 23:59:59');
const base = 1000; const base = 1000;
const reset = [1, 4, 7, 10].indexOf(moment().month() + 1) >= 0;
try { try {
await this.mcdb.query( await this.mcdb.query(
'select monthly_user_historical_record($1::text, $2, $3::boolean, true)', 'select monthly_user_historical_record($1::text, $2, $3::boolean, true)',
[season, base, false], [season, base, reset],
); );
await this.mcdb.query('select collect_win_lose_rate($1, $2)', [ await this.mcdb.query('select collect_win_lose_rate($1, $2)', [
lower_limit, lower_limit,
......
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