|
|
@@ -1,8 +1,6 @@
|
|
|
const API = require("../../../../lib/API.js")
|
|
|
const db = require("../../../../plugin/DataBase/db.js")
|
|
|
-const axios = require('axios')
|
|
|
const EmailTemplate = require('../../../../plugin/Email/emailTemplate.js')
|
|
|
-const config = require('../../../../config.json')
|
|
|
const lepao = require("../../../../lib/Lepao/Lepao.js").lepao
|
|
|
const mq = require('../../../../plugin/mq')
|
|
|
const { BaseStdResponse } = require("../../../../BaseStdResponse.js")
|
|
|
@@ -14,7 +12,6 @@ class UpdateAccountAndroidApp extends API {
|
|
|
super()
|
|
|
|
|
|
this.messageQueue = 'runforge_message_queue'
|
|
|
- this.runpy = config.runpy
|
|
|
|
|
|
this.setPath('/Lepao/UpdateAccountAndroidApp')
|
|
|
this.setMethod('POST')
|
|
|
@@ -144,20 +141,20 @@ class UpdateAccountAndroidApp extends API {
|
|
|
}
|
|
|
|
|
|
// 获取新加账号中存在的路径
|
|
|
- try {
|
|
|
- let sql = 'SELECT id FROM lepao_record WHERE lepao_account = ?'
|
|
|
- let rows = await db.query(sql, [student_num])
|
|
|
-
|
|
|
- // 不是老帐号就不获取
|
|
|
- if (!rows || rows.length !== 0) return
|
|
|
-
|
|
|
- const reqData = { uid, token, school_id, student_id: student_num }
|
|
|
- this.logger.info(`开始请求获取跑步记录 uid=${uid} student_id=${student_num}`)
|
|
|
- const recordUrl = this.runpy + '/get_path_data'
|
|
|
- await axios.post(recordUrl, reqData)
|
|
|
- } catch (error) {
|
|
|
- this.logger.info(`获取跑步记录出错 ${error.stack}`)
|
|
|
- }
|
|
|
+ // try {
|
|
|
+ // let sql = 'SELECT id FROM lepao_record WHERE lepao_account = ?'
|
|
|
+ // let rows = await db.query(sql, [student_num])
|
|
|
+
|
|
|
+ // // 不是老帐号就不获取
|
|
|
+ // if (!rows || rows.length !== 0) return
|
|
|
+
|
|
|
+ // const reqData = { uid, token, school_id, student_id: student_num }
|
|
|
+ // this.logger.info(`开始请求获取跑步记录 uid=${uid} student_id=${student_num}`)
|
|
|
+
|
|
|
+
|
|
|
+ // } catch (error) {
|
|
|
+ // this.logger.info(`获取跑步记录出错 ${error.stack}`)
|
|
|
+ // }
|
|
|
|
|
|
} catch (error) {
|
|
|
this.logger.error(`更新用户信息时出错。${error.stack}`)
|