|
|
@@ -214,7 +214,7 @@ class Lepao {
|
|
|
throw new Error(data?.info || '未知错误,请尝试重新登录')
|
|
|
}
|
|
|
|
|
|
- await this.addRecord(uuid, account, data.data, path_id)
|
|
|
+ await this.addRecord(uuid, account, data.data, path_id, point_data)
|
|
|
|
|
|
// 获取剩余跑步次数
|
|
|
const recordData = await this.getRecord(uid, token, school_id, account)
|
|
|
@@ -255,12 +255,12 @@ class Lepao {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- async addRecord(uuid, account, result, path_id) {
|
|
|
+ async addRecord(uuid, account, result, path_id, point_data) {
|
|
|
try {
|
|
|
const time = Date.now()
|
|
|
this.logger.info(`${account}添加乐跑记录,path_id=${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])
|
|
|
+ const sql = 'INSERT INTO lepao_record (uuid, time, lepao_account, result, path_id, point_data) VALUES (?, ?, ?, ?, ?, ?)'
|
|
|
+ await db.query(sql, [uuid, time, account, result, path_id, point_data])
|
|
|
this.logger.info(`${account}添加乐跑记录成功`)
|
|
|
} catch (error) {
|
|
|
this.logger.error(`添加乐跑记录失败: ${error.stack || error.message}`)
|