diff --git a/docs/sim_infos.xlsx b/docs/sim_infos.xlsx
index 8aec01d..126bda2 100644
Binary files a/docs/sim_infos.xlsx and b/docs/sim_infos.xlsx differ
diff --git a/notification/AcceptedResultPojo.py b/notification/AcceptedResultPojo.py
index 5bd04ec..883c759 100644
--- a/notification/AcceptedResultPojo.py
+++ b/notification/AcceptedResultPojo.py
@@ -9,7 +9,7 @@ from pojo import ReserveResultPojo
@dataclass
class AcceptedResultPojo:
- def __init__(self, msg: str, slot_position, sim_position, passport, email, name, phone):
+ def __init__(self, msg: str, slot_position, sim_position, passport, email, name, phone, ccid: str, url):
self.sms_msg = msg
self.slot_position = slot_position
self.sim_position = sim_position
@@ -17,9 +17,12 @@ class AcceptedResultPojo:
self.email = email
self.name = name
self.phone = phone
+ self.ccid = ccid
+ self.url = url
def get_accepted_result_from(sms, sim_info: ReserveResultPojo) -> AcceptedResultPojo:
return AcceptedResultPojo(sms.text, slot_position=sim_info.slot_position, sim_position=sim_info.sim_position,
passport=sim_info.passport, email=sim_info.email, phone=sim_info.phone,
- name="{} {}".format(sim_info.lastName, sim_info.firstName))
+ name="{} {}".format(sim_info.lastName, sim_info.firstName), ccid=sim_info.ccid,
+ url=sim_info.url)
diff --git a/notification/mailer.py b/notification/mailer.py
index 71235e6..6a57aa2 100644
--- a/notification/mailer.py
+++ b/notification/mailer.py
@@ -5,9 +5,7 @@ from mako.template import Template
import boto3
import definitions
-import params
from notification.AcceptedResultPojo import AcceptedResultPojo
-from pojo.ReserveResultPojo import ReserveResultPojo, PublishType
TEMPLATE_NAME = 'scrapy_template_email'
AWS_CLIENT_NAME = "sesv2"
@@ -53,14 +51,3 @@ class Mailer:
},
}
)
-
-
-if __name__ == '__main__':
- result = ReserveResultPojo(email="purge_jigsaws_0p@icloud.com", phone="0649614591", url="url", firstName="wenjing",
- lastName="Chen", message="msg", type=PublishType.SUCCESS, passport="Ed1543183",
- slot_position=1, sim_position=1)
-
- # mytemplate = Template(filename=definitions.ROOT_DIR + "/templates/appointment_results.html")
- # print(mytemplate.render(result_list=[result]))
- mailer = Mailer()
- mailer.send_email([result])
diff --git a/templates/appointment_results.html b/templates/appointment_results.html
index 2a7a2c6..7faa8a7 100644
--- a/templates/appointment_results.html
+++ b/templates/appointment_results.html
@@ -1,6 +1,15 @@
姓名:${result.name}
+
电话: ${result.phone}
+
邮件: ${result.email},
+
护照: ${result.passport}
+
SIM卡位置: 卡池第${result.slot_position}行,第${result.sim_position}列
-
短信: ${result.sms_msg}
\ No newline at end of file
+
+
短信内容: ${result.sms_msg}
+
+
SIM卡CCID: ${result.ccid}
+
+
约会url: ${result.url}
diff --git a/workers/wait_sms_worker.py b/workers/wait_sms_worker.py
index e969e51..d0b770d 100644
--- a/workers/wait_sms_worker.py
+++ b/workers/wait_sms_worker.py
@@ -1,5 +1,4 @@
import datetime
-import json
import logging
import threading
import time
@@ -85,4 +84,4 @@ if __name__ == '__main__':
worker = WaitSmsWorker(None)
sms = Sms("HERMES RDV",
"We are pleased to confirm your appointment. You will be welcomed on Apr 14, 2022 in our store at 17 rue de Sèvres at 4:45 PM. The given hour may be subje")
- worker.check_sms(sms, int('613467904'))
+ worker.check_sms(sms, int('628973387'))