zhl 3 年之前
父節點
當前提交
20aa2fe0b8
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Apietl/task/send_material_report_weekly.py

+ 2 - 2
Apietl/task/send_material_report_weekly.py

@@ -45,7 +45,7 @@ FROM
 LEFT JOIN `jeecg-boot`.ctop_etl_kuaishou_video_info t2 ON t1.signature = t2.video_code
 LEFT JOIN `jeecg-boot`.ctop_project t3
 on t1.project_id=t3.id
-where t1.stat_date between date_sub({stat_date}, INTERVAL 6 DAY)  and {stat_date} 
+where t1.stat_date between date_sub('{stat_date}', INTERVAL 6 DAY)  and '{stat_date}'
 GROUP BY
 t1.signature; """.format(stat_date=self.stat_date)
         print(sql)
@@ -54,7 +54,7 @@ t1.signature; """.format(stat_date=self.stat_date)
         pd.read_sql(sql, self.OuterConn).to_excel(path, index=False, engine='openpyxl')
         my_sender = 'zhaohailiang@c-top.com.cn'  # 发件人邮箱账号
         my_pass = 'h27UwLdJcD797THk'  # 发件人邮箱授权码 / 腾讯企业邮箱请使用登陆密码
-        recipients = ['wanglei@c-top.com.cn','niuxiaoyu@c-top.com.cn','dukexuan@c-top.com.cn','yangyan@c-top.com.cn']  # 收件人邮箱账号
+        recipients = ['wanglei@c-top.com.cn','niuxiaoyu@c-top.com.cn','dukexuan@c-top.com.cn','yangyan@c-top.com.cn','']  # 收件人邮箱账号
         # content = "Please check the attachment. "
         msg = MIMEMultipart()
         # [发件人的邮箱昵称、发件人邮箱账号], 昵称随便