|
@@ -60,9 +60,9 @@ def image():
|
|
|
max(dt) end_date,
|
|
|
min(dt) start_date,
|
|
|
min(preview_url) content,
|
|
|
- if(flag=1,2,1) type,
|
|
|
+ if(is_video=1,2,1) type,
|
|
|
if(locate(',',signature)>0,0,1) single_img
|
|
|
- from dw_image_cost_day where signature is not null and signature !='' GROUP BY signature,flag limit 1000"""
|
|
|
+ from dw_image_cost_day where signature is not null and signature !='' GROUP BY signature,is_video limit 1000"""
|
|
|
|
|
|
df = db.dm.getData_pd(sql)
|
|
|
# print(df)
|
|
@@ -77,6 +77,9 @@ def image():
|
|
|
db.zx_test.dfsave2mysql(df, table, key, tag)
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
def adcreative():
|
|
|
sql="""select signature,title,description article,
|
|
|
sum(click_count) click_times,
|
|
@@ -86,10 +89,10 @@ group_concat(distinct book) novels,
|
|
|
max(dt) start_date,min(dt) end_date,
|
|
|
min(preview_url) media,
|
|
|
type channel,
|
|
|
-if(flag=1,2,1) type,
|
|
|
+if(is_video=1,2,1) type,
|
|
|
if(locate(',',signature)>0,0,1) single_img
|
|
|
|
|
|
-from dw_image_cost_day where signature is not null and signature!='' GROUP BY signature,title,description,type,flag
|
|
|
+from dw_image_cost_day where signature is not null and signature!='' GROUP BY signature,title,description,type,is_video
|
|
|
"""
|
|
|
|
|
|
df = db.dm.getData_pd(sql)
|
|
@@ -104,5 +107,5 @@ from dw_image_cost_day where signature is not null and signature!='' GROUP BY
|
|
|
if __name__ == '__main__':
|
|
|
# title()
|
|
|
# description()
|
|
|
- # image()
|
|
|
+ image()
|
|
|
adcreative()
|