Browse Source

🎈 perf: 启用距离区间

Pchen. 7 months ago
parent
commit
9d23d8a84c
1 changed files with 5 additions and 5 deletions
  1. 5 5
      lib/Lepao/Lepao.js

+ 5 - 5
lib/Lepao/Lepao.js

@@ -14,19 +14,19 @@ class Lepao {
 
 
     async getPath(account, vip) {
     async getPath(account, vip) {
         this.logger.info(`${account}开始获取路径`)
         this.logger.info(`${account}开始获取路径`)
-        const accountSql = 'SELECT area, max_distance, min_distance, sex FROM lepao_account WHERE student_num = ?'
+        const accountSql = 'SELECT area, sex FROM lepao_account WHERE student_num = ?'
         const rows = await db.query(accountSql, [account])
         const rows = await db.query(accountSql, [account])
         if (!rows || rows.length === 0) {
         if (!rows || rows.length === 0) {
             this.logger.error(`${account}无法获取账号数据`)
             this.logger.error(`${account}无法获取账号数据`)
             throw new Error('无法获取账号数据')
             throw new Error('无法获取账号数据')
         }
         }
 
 
-        const { area, max_distance, min_distance, sex } = rows[0]
+        const { area, sex } = rows[0]
 
 
-        let max = Number(max_distance) || 4.00
-        let min = Number(min_distance) || 2.00
+        let max = 4.00
+        let min = 2.00
         if (sex === 2) {
         if (sex === 2) {
-            max = Number(max_distance) || 2.50
+            max = 2.50
             min = 1.60
             min = 1.60
         }
         }