|
@@ -165,14 +165,16 @@ class AutoReplyCardsMonitorUtils(AutoReplyCardsMonitorConst):
|
|
|
# 获取检测的账号 list
|
|
# 获取检测的账号 list
|
|
|
@staticmethod
|
|
@staticmethod
|
|
|
def get_monitor_account_list():
|
|
def get_monitor_account_list():
|
|
|
- yesterday = (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"""
|
|
query = f"""
|
|
|
SELECT 公众号名, ghid, count(DISTINCT mid) AS uv
|
|
SELECT 公众号名, ghid, count(DISTINCT mid) AS uv
|
|
|
FROM loghubods.opengid_base_data
|
|
FROM loghubods.opengid_base_data
|
|
|
- WHERE dt = {yesterday}
|
|
|
|
|
|
|
+ WHERE dt = {dt}
|
|
|
AND hotsencetype = 1074
|
|
AND hotsencetype = 1074
|
|
|
AND usersharedepth = 0
|
|
AND usersharedepth = 0
|
|
|
AND channel = '公众号合作-即转-稳定'
|
|
AND channel = '公众号合作-即转-稳定'
|
|
|
|
|
+ AND 点击时间 >= '{week_ago}'
|
|
|
GROUP BY 公众号名, ghid
|
|
GROUP BY 公众号名, ghid
|
|
|
HAVING uv >= 100
|
|
HAVING uv >= 100
|
|
|
ORDER BY uv DESC
|
|
ORDER BY uv DESC
|