Bladeren bron

Merge branch 'feature/luojunhui/20260120-code-improve' of Server/LongArticleTaskServer into master

luojunhui 1 maand geleden
bovenliggende
commit
1775de2da8

+ 2 - 2
applications/tasks/monitor_tasks/auto_reply_cards_monitor.py

@@ -165,12 +165,12 @@ class AutoReplyCardsMonitorUtils(AutoReplyCardsMonitorConst):
     # 获取检测的账号 list
     @staticmethod
     def get_monitor_account_list():
-        dt = (datetime.today() - timedelta(days=1)).strftime("%Y%m%d")
+        # dt = (datetime.today() - timedelta(days=1)).strftime("%Y%m%d")
         week_ago = (datetime.today() - timedelta(days=7)).strftime("%Y-%m-%d %H:%M:%S")
         query = f"""
             SELECT  公众号名, ghid, count(DISTINCT mid) AS uv
             FROM    loghubods.opengid_base_data
-            WHERE   dt = {dt}
+            WHERE   dt = MAX_PT('loghubods.opengid_base_data')
             AND     hotsencetype = 1074
             AND     usersharedepth = 0
             AND     channel = '公众号合作-即转-稳定'

+ 2 - 2
applications/tasks/monitor_tasks/cooperate_accounts_monitor.py

@@ -27,12 +27,12 @@ class CooperateAccountsMonitorTaskConst:
 class CooperateAccountsMonitorTaskUtils(CooperateAccountsMonitorTaskConst):
     @staticmethod
     def get_monitor_account_list():
-        dt = (datetime.today() - timedelta(days=1)).strftime("%Y%m%d")
+        # dt = (datetime.today() - timedelta(days=1)).strftime("%Y%m%d")
         week_ago = (datetime.today() - timedelta(days=7)).strftime("%Y-%m-%d %H:%M:%S")
         query = f"""
             SELECT  公众号名, ghid, count(DISTINCT mid) AS uv
             FROM    loghubods.opengid_base_data
-            WHERE   dt = {dt}
+            WHERE   dt = MAX_PT('loghubods.opengid_base_data')
             AND     hotsencetype = 1058
             AND     usersharedepth = 0
             AND     channel = '公众号合作-即转-稳定'