Jared %!s(int64=3) %!d(string=hai) anos
pai
achega
7fd70b90d6
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      tests/jaredmail.py

+ 2 - 2
tests/jaredmail.py

@@ -7,7 +7,7 @@ db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/seo?charset=utf8mb
 lst=[]
 cliend_id='db'
 campaign='20220305-test'
-cursor=db.query('select email,title from mail_list where enabled=1 and email not in (select email from emaillog where campaign="'+campaign+'") order by rand() limit 1')
+cursor=db.query('select id,email,title from mail_list where enabled=1 and email not in (select email from emaillog where campaign="'+campaign+'") order by rand() limit 1')
 for c in cursor:
     lst.append(c)
 
@@ -18,7 +18,7 @@ for c in lst:
     mailobj['title']=c['title']+'x ChoozMo 合作洽談 '
     display={}
     display['custname']=c['title']
-    display['client']=cliend_id
+    display['client']=c['id']
     display['email']=mailobj['toaddr']
     display['campaign']=campaign
     mailobj['display']=display