|
@@ -101,8 +101,8 @@ class AddAccount extends API {
|
|
|
|
|
|
|
|
if (!id) {
|
|
if (!id) {
|
|
|
if (countRows.length !== 0) {
|
|
if (countRows.length !== 0) {
|
|
|
- sql = 'UPDATE lepao_account SET create_user = ?, email = ?, area = ?, auto_time = ?, auto_run = ?, target_count = ?, create_time = ?, notes = ?, auto_day = ? WHERE id = ?'
|
|
|
|
|
- r = await db.query(sql, [uuid, email, area, auto_time, auto_run, target_count, time, notes ?? '', JSON.stringify(auto_day), countRows[0].id])
|
|
|
|
|
|
|
+ sql = 'UPDATE lepao_account SET create_user = ?, email = ?, area = ?, auto_time = ?, auto_run = ?, target_count = ?, create_time = ?, update_time = ?, notes = ?, auto_day = ? WHERE id = ?'
|
|
|
|
|
+ r = await db.query(sql, [uuid, email, area, auto_time, auto_run, target_count, time, time, notes ?? '', JSON.stringify(auto_day), countRows[0].id])
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
const face_code = await this.generateCode()
|
|
const face_code = await this.generateCode()
|
|
@@ -116,8 +116,8 @@ class AddAccount extends API {
|
|
|
return res.json({ ...BaseStdResponse.ERR, msg: '添加乐跑账号失败!数据库错误' })
|
|
return res.json({ ...BaseStdResponse.ERR, msg: '添加乐跑账号失败!数据库错误' })
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
- sql = 'UPDATE lepao_account SET student_num = ?, email = ?, area = ?, auto_time = ?, target_count = ?, auto_run = ?, notes = ?, auto_day = ? WHERE id = ?'
|
|
|
|
|
- r = await db.query(sql, [student_num, email, area, auto_time, target_count, auto_run, notes ?? '', JSON.stringify(auto_day), id])
|
|
|
|
|
|
|
+ sql = 'UPDATE lepao_account SET student_num = ?, email = ?, area = ?, auto_time = ?, target_count = ?, auto_run = ?, notes = ?, auto_day = ?, update_time = ? WHERE id = ?'
|
|
|
|
|
+ r = await db.query(sql, [student_num, email, area, auto_time, target_count, auto_run, notes ?? '', JSON.stringify(auto_day), time, id])
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
try {
|