libushang 7 місяців тому
батько
коміт
39e7f2483d
1 змінених файлів з 3 додано та 1 видалено
  1. 3 1
      routers/api/onlineRollCall/call.py

+ 3 - 1
routers/api/onlineRollCall/call.py

@@ -569,7 +569,9 @@ async def get_event_list(
     db: Session = Depends(get_db)):
 
     try:
-        where = and_(OnlineRollCallBase.del_flag == '0')
+        # 两周内
+        d1 = datetime.now() - timedelta(days=14)
+        where = and_(OnlineRollCallBase.del_flag == '0', OnlineRollCallBase.create_time > d1)
 
         if begin_date is not None and begin_date != '':
             begin_date = datetime.strptime(begin_date, "%Y-%m-%d")