Browse Source

🐞 fix: 修复乐跑成功后未更新count的问题

Pchen. 2 months ago
parent
commit
a8f57918c5
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/Lepao/cg_lepao.js

+ 3 - 0
lib/Lepao/cg_lepao.js

@@ -296,6 +296,9 @@ class cgLepao {
 
                 await this.writeRedis(task.account)
 
+                let updateAccountSql = 'UPDATE lepao_account SET total_num = ? WHERE student_num = ?'
+                await db.query(updateAccountSql, [frequency, task.account])
+
                 this.sendSuccessEmail(task.account, lepaoResult, frequency)
             } catch (error) {
                 await this.lepaoFail(task.uuid)