Переглянути джерело

自主推送统计接口1

tanghongbin 5 роки тому
батько
коміт
fa1f59ec8a
1 змінених файлів з 7 додано та 7 видалено
  1. 7 7
      Controller/StatisticsController.py

+ 7 - 7
Controller/StatisticsController.py

@@ -148,12 +148,12 @@ def statistcsPushDay(request):
     else:
     else:
         return response.json(444)
         return response.json(444)
 
 
-    # token = TokenObject(request_dict.get('token', None))
-    # if token.code != 0:
-    #     return response.json(token.code)
+    token = TokenObject(request_dict.get('token', None))
+    if token.code != 0:
+        return response.json(token.code)
 
 
     localtime = time.localtime()
     localtime = time.localtime()
-    current_day = localtime.tm_mday+1
+    current_day = localtime.tm_mday
     print(current_day)
     print(current_day)
 
 
     time_struct = [localtime.tm_year, localtime.tm_mon, current_day - 1, 0, 0, 0, 0, 0, 0]
     time_struct = [localtime.tm_year, localtime.tm_mon, current_day - 1, 0, 0, 0, 0, 0, 0]
@@ -201,9 +201,9 @@ def statistcsPushMonth(request):
     else:
     else:
         return response.json(444)
         return response.json(444)
 
 
-    # token = TokenObject(request_dict.get('token', None))
-    # if token.code != 0:
-    #     return response.json(token.code)
+    token = TokenObject(request_dict.get('token', None))
+    if token.code != 0:
+        return response.json(token.code)
 
 
     localtime = time.localtime()
     localtime = time.localtime()
     current_month = localtime.tm_mon
     current_month = localtime.tm_mon