Parcourir la source

修改手機"-"符號處理方式

Mike il y a 3 ans
Parent
commit
e423e545ed
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      api/main.py

+ 1 - 1
api/main.py

@@ -69,7 +69,7 @@ async def checkCellphone(cellphone: str = ''):
     # 取得手機號碼資料
     q = "SELECT * \
         FROM agent_form \
-        WHERE cellphone IN ('" + cellphone_list + "')"
+        WHERE REPLACE(cellphone, '-', '') IN ('" + cellphone_list + "')"
 
     count = len(list(db.query(q)))