1. zuroc
  2. zpage

Commits

zsp042  committed dd187b0

fix

  • Participants
  • Parent commits 61f2ff8
  • Branches 42qu

Comments (0)

Files changed (1)

File model/user_mail.py

View file
     #    print i.id
 #    print mail_by_user_id(10128296)
     #
-    mail = 'kilnt.huo@gmail.com'
-    print UserMail.raw_sql('select count(1) from user_mail where mail=%s', mail).fetchone()
-    print UserMail.raw_sql("select user_id from user_mail where mail=%s", mail).fetchone()
-    from model.vps_sell import VpsOne, vps_one_count_by_user_id 
-    print user_by_mail(mail).id
-    c = UserMail.raw_sql('update user_mail set user_id = %s where mail=%s',10077177, mail)
-#    print c 
-    vps = VpsOne.get(377)
-    vps.user_id = 10077177
-    print vps, vps.state
-    vps.save()
 
-    mc_user_id_by_mail.delete(mail)
-    print vps_one_count_by_user_id(10077177)
+    for i in UserMail.where(user_id=10077177):
+        print i.user_id,i.mail
+#m2id = {}
+#with open("/home/work/De1C9gzRvMY") as s:
+#    for line in s:
+#        id , mail = line.strip().split(" ")
+#        m2id[mail] = id
+
+#count = 1000000
+#for i in UserMail.where(user_id=10077177):
+#    print i.id, i.mail
+#    if mail in m2id:
+#        try:
+#            i.user_id = m2id[i.mail]
+#            i.save()
+#        except:
+#            continue
+#mail = 'kilnt.huo@gmail.com'
+#print UserMail.raw_sql('select count(1) from user_mail where mail=%s', mail).fetchone()
+#print UserMail.raw_sql("select user_id from user_mail where mail=%s", mail).fetchone()
+#from model.vps_sell import VpsOne, vps_one_count_by_user_id 
+#print user_by_mail(mail).id
+#c = UserMail.raw_sql('update user_mail set user_id = %s where mail=%s',10077177, mail)
+#   # print c 
+#vps = VpsOne.get(377)
+#vps.user_id = 10077177
+#print vps, vps.state
+#vps.save()
+
+#mc_user_id_by_mail.delete(mail)
+#print vps_one_count_by_user_id(10077177)