| Line 40... |
Line 40... |
| 40 |
db = MySQLdb.connect('localhost',"root","shop2020","dtr" )
|
40 |
db = MySQLdb.connect('localhost',"root","shop2020","dtr" )
|
| 41 |
cursor = db.cursor()
|
41 |
cursor = db.cursor()
|
| 42 |
|
42 |
|
| 43 |
ALL_STORES_SQL = "select * from stores"
|
43 |
ALL_STORES_SQL = "select * from stores"
|
| 44 |
GCM_REG_ID_SQL1 = "select x.user_id, x.gcm_regid, x.id, x.androidid, x.created from (select * from gcm_users where user_id in (%s) and androidid is not null order by id desc) as x group by x.user_id, x.gcm_regid, x.androidid"
|
44 |
GCM_REG_ID_SQL1 = "select x.user_id, x.gcm_regid, x.id, x.androidid, x.created from (select * from gcm_users where user_id in (%s) and androidid is not null order by id desc) as x group by x.user_id, x.gcm_regid, x.androidid"
|
| 45 |
GCM_REG_ID_SQL2 = "select x.user_id, x.gcm_regid, x.id, x.androidid, x.created from (select * from gcm_users where user_id in (%s) and androidid is null order by id desc) as x group by x.user_id, x.gcm_regid"
|
45 |
GCM_REG_ID_SQL2 = "select x.user_id, x.gcm_regid, x.id, x.androidid, x.created, x.imeinumber from (select * from gcm_users where user_id in (%s) and androidid is null and imeinumber is not null order by id desc) as x group by x.user_id, x.imeinumber"
|
| 46 |
|
46 |
|
| 47 |
cursor.execute(ALL_STORES_SQL)
|
47 |
cursor.execute(ALL_STORES_SQL)
|
| 48 |
result_stores = cursor.fetchall()
|
48 |
result_stores = cursor.fetchall()
|
| 49 |
domainStoresMap = {}
|
49 |
domainStoresMap = {}
|
| 50 |
for rec in result_stores:
|
50 |
for rec in result_stores:
|