瀏覽代碼

Merge branch 'master' of http://git.choozmo.com:3000/choozmo/HHH_Course into master

jeter20131220 3 年之前
父節點
當前提交
22dad37780
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 二進制
      api/__pycache__/main.cpython-39.pyc
  2. 3 2
      api/main.py

二進制
api/__pycache__/main.cpython-39.pyc


+ 3 - 2
api/main.py

@@ -41,6 +41,7 @@ class client_info(BaseModel):
     cert_last5:str
     where_learn:str
     why_sign:str
+    line_id:str
     
 
 
@@ -73,7 +74,7 @@ async def add_client_info(ci:client_info):
         time_stamp = time_stamp.strftime("%Y-%m-%d %H:%M:%S")
  
         pk = request_table.insert({'name':ci.name,'organization':ci.organization,'position':ci.position,'phone':ci.phone,'email':ci.email
-            ,'cert_last5':ci.cert_last5,'where_learn':ci.where_learn,'why_sign':ci.why_sign,'time_stamp':time_stamp})
+            ,'cert_last5':ci.cert_last5,'where_learn':ci.where_learn,'why_sign':ci.why_sign,'line_id':ci.line_id,'time_stamp':time_stamp})
         make_ci_df()
         return return_code
     else :
@@ -97,7 +98,7 @@ def make_ci_df():
         
         df = df.append({'serial id':row['id'],'姓名':row['name'],'公司':row['organization']
         ,'職稱':row['position'],'電話':row['phone'],"e-mail":row['email'],'已匯款,後五碼':row['cert_last5']
-        ,'如何知道這個課程':row['where_learn'],'爲什麼想報名':row['why_sign']}, ignore_index=True)
+        ,'如何知道這個課程':row['where_learn'],'爲什麼想報名':row['why_sign'],'Line_ID':row['line_id']}, ignore_index=True)
     save_sheet(df,'client_info','result')
     
 def save_sheet(df,filename,tabname,startpos='A1'):