|
@@ -385,7 +385,7 @@ class JianYeReport(object):
|
|
|
def get_customer_info_by_id(self, customer_id):
|
|
|
return self.db.select(Sql.sql_14, [customer_id])
|
|
|
|
|
|
- def send_mail_for_customer_id(self, customer_id, new_mail=None):
|
|
|
+ def send_mail_for_customer_id(self, customer_id, task_key=None, new_mail=None):
|
|
|
"""
|
|
|
获取指定客户的邮件信息
|
|
|
:param customer_id:
|
|
@@ -393,7 +393,11 @@ class JianYeReport(object):
|
|
|
:return:
|
|
|
"""
|
|
|
message = {}
|
|
|
- customers = self.get_customer_info_by_id(customer_id)
|
|
|
+ customers = []
|
|
|
+ if task_key:
|
|
|
+ customers = self.get_report_customers(task_key)
|
|
|
+ else:
|
|
|
+ customers = self.get_customer_info_by_id(customer_id)
|
|
|
message['customer'] = str(customer_id)
|
|
|
send_data = []
|
|
|
if customers:
|