Mike %!s(int64=4) %!d(string=hai) anos
pai
achega
62c9be8676
Modificáronse 1 ficheiros con 7 adicións e 7 borrados
  1. 7 7
      is_close_changed_notice.py

+ 7 - 7
is_close_changed_notice.py

@@ -99,8 +99,8 @@ class Execute(BaseModel):
     is_close: str # 是否結案 (N: 未結案,Y: 已結案,T: 未上線,D: 續約,E: 不續約延期,F: 不續約需下線,G: 已到期未續約)
     # price: int 
 
-@app.post("/is_close_changed_notice")
-async def is_close_changed_notice(e:Execute):
+@app.get("/is_close_changed_notice")
+async def is_close_changed_notice(exf_id: int = 0, is_close: str = ''):
     html = """
         <!DOCTYPE html>
         <head>
@@ -108,15 +108,15 @@ async def is_close_changed_notice(e:Execute):
         </head>
         <body>
         """
-    html += "<div>exf_id = " + e.exf_id + ", is_close = " + e.is_close + "</div>";
+    html += "<div>exf_id = " + exf_id + ", is_close = " + is_close + "</div>";
     
-    if e.is_close == 'D':
+    if is_close == 'D':
         html += "D: 續約"
-    elif e.is_close == 'E':
+    elif is_close == 'E':
         html += "E: 不續約延期"
-    elif e.is_close == 'F':
+    elif is_close == 'F':
         html += "F: 不續約需下線"
-    elif e.is_close == 'G':
+    elif is_close == 'G':
         html += "G: 已到期未續約"
 
     html += """