Browse Source

✨ feat: 取消对新增账户获取路径

Pchen. 1 month ago
parent
commit
747c2ffd48

+ 14 - 17
apis/Lepao/Account/UpdateAccount/UpdateAccount.js

@@ -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")
@@ -15,7 +13,6 @@ class UpdateAccount extends API {
 
         this.messageQueue = 'runforge_message_queue'
 
-        this.runpy = config.runpy
         this.noEncrypt()
         this.setPath('/Lepao/UpdateAccount')
         this.setMethod('POST')
@@ -142,20 +139,20 @@ class UpdateAccount 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}`)

+ 14 - 17
apis/Lepao/Account/UpdateAccount/UpdateAccountAndroidApp.js

@@ -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}`)

+ 14 - 17
apis/Lepao/Account/UpdateAccount/UpdateAccountiPhone.js

@@ -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 UpdateAccountiPhone extends API {
         super()
 
         this.messageQueue = 'runforge_message_queue'
-        this.runpy = config.runpy
         this.noEncrypt()
         this.setPath('/Lepao/UpdateAccountiPhone')
         this.setMethod('POST')
@@ -146,20 +143,20 @@ class UpdateAccountiPhone 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}`)