|
@@ -24,7 +24,7 @@ class CampaignDailyReport:
|
|
|
def daily_report(self):
|
|
|
try:
|
|
|
sql = """select count(1) from media_api.kuaishou_campaign_report_daily where
|
|
|
- stat_date = {start_time} """.format(
|
|
|
+ stat_date >= {start_time} """.format(
|
|
|
start_time=self.start_time)
|
|
|
totalNum = TidbConn.quary(self.conn, sql)[0][0]
|
|
|
pageCount = ceil(totalNum / 20000)
|
|
@@ -231,7 +231,7 @@ WHERE
|
|
|
cua.account_id IS NOT NULL
|
|
|
) sys
|
|
|
on report.advertiser_id = sys.account_id
|
|
|
- where report.stat_date ={start_time} order by campaign_id,stat_date limit {num},20000""". \
|
|
|
+ where report.stat_date >={start_time} order by campaign_id,stat_date limit {num},20000""". \
|
|
|
format(start_time=self.start_time, num=i * 20000)
|
|
|
print(sql)
|
|
|
TidbConn.upsert(conn=self.conn, sql_buff=sql)
|