|
@@ -27,11 +27,12 @@ class send_material_report_weekly:
|
|
|
self.stat_date = (datetime.date.today() + datetime.timedelta(-1)).strftime("%Y-%m-%d")
|
|
|
|
|
|
def handler(self):
|
|
|
- sql = """select company_id as '分公司id',company_name as '分公司名称',account_id as '账户id',account_name as'账户名称',project_name as'项目名称',
|
|
|
-a.signature as '素材id',b.frast_cost_time as'素材首次消耗时间',video_name as '素材名称',sum(charge) as '消耗',clip_name as '剪辑',shot_name as '拍摄',plan_name as '编导',leader_name as '负责人',photo_url as '视频链接',channel_name as '渠道类型'
|
|
|
-from application.app_kuaishou_video_report_busi_m a
|
|
|
-left join application.material_farst_cost_time b
|
|
|
-on a.signature=b.signature
|
|
|
+ sql = """select a.company_id as '分公司id',a.company_name as '分公司名称',a.account_id as '账户id',a.account_name as'账户名称',a.project_name as'项目名称',
|
|
|
+a.signature as '素材id',b.farst_cost_time as'素材首次消耗时间',b.media_time as '素材上线时间',a.video_name as '素材名称',sum(a.charge) as '消耗',
|
|
|
+a.clip_name as '剪辑',a.shot_name as '拍摄',a.plan_name as '编导',a.leader_name as '负责人',a.photo_url as '视频链接',a.channel_name as '渠道类型'
|
|
|
+from app_kuaishou_video_report_busi_m a
|
|
|
+left join application.app_kuaishou_material_info b
|
|
|
+on a.signature=b.material_id
|
|
|
where stat_mon=202112
|
|
|
group by a.account_id,a.signature""".format(stat_date=self.stat_date)
|
|
|
print(sql)
|