|
@@ -179,7 +179,7 @@ class Lepao {
|
|
|
throw new Error(data?.info || '未知错误,请尝试重新登录')
|
|
throw new Error(data?.info || '未知错误,请尝试重新登录')
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- await this.addRecord(account, data.data, path_id)
|
|
|
|
|
|
|
+ await this.addRecord(uuid, account, data.data, path_id)
|
|
|
|
|
|
|
|
// 获取剩余跑步次数
|
|
// 获取剩余跑步次数
|
|
|
const recordData = await this.getRecord(uid, token, school_id, account)
|
|
const recordData = await this.getRecord(uid, token, school_id, account)
|
|
@@ -213,12 +213,12 @@ class Lepao {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- async addRecord(account, result, path_id) {
|
|
|
|
|
|
|
+ async addRecord(uuid, account, result, path_id) {
|
|
|
try {
|
|
try {
|
|
|
const time = Date.now()
|
|
const time = Date.now()
|
|
|
this.logger.info(`${account}添加乐跑记录,path_id=${path_id}`)
|
|
this.logger.info(`${account}添加乐跑记录,path_id=${path_id}`)
|
|
|
- const sql = 'INSERT INTO lepao_record (time, lepao_account, result, path_id) VALUES (?, ?, ?, ?)'
|
|
|
|
|
- await db.query(sql, [time, account, result, path_id])
|
|
|
|
|
|
|
+ const sql = 'INSERT INTO lepao_record (uuid, time, lepao_account, result, path_id) VALUES (?, ?, ?, ?, ?)'
|
|
|
|
|
+ await db.query(sql, [uuid, time, account, result, path_id])
|
|
|
this.logger.info(`${account}添加乐跑记录成功`)
|
|
this.logger.info(`${account}添加乐跑记录成功`)
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
this.logger.error(`添加乐跑记录失败: ${error.stack || error.message}`)
|
|
this.logger.error(`添加乐跑记录失败: ${error.stack || error.message}`)
|
|
@@ -274,7 +274,7 @@ class Lepao {
|
|
|
const data = {
|
|
const data = {
|
|
|
name: rows[0].name,
|
|
name: rows[0].name,
|
|
|
account,
|
|
account,
|
|
|
- reason
|
|
|
|
|
|
|
+ reason: reason === 'Request failed with status code 503' ? 'RunForge系统维护中,请稍后再试' : reason
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
await EmailTemplate.lepaoFail(rows[0].email, data)
|
|
await EmailTemplate.lepaoFail(rows[0].email, data)
|