| Line 58... |
Line 58... |
| 58 |
|
58 |
|
| 59 |
db = MySQLdb.connect(options.mysqlHost,"root","shop2020","dtr" )
|
59 |
db = MySQLdb.connect(options.mysqlHost,"root","shop2020","dtr" )
|
| 60 |
cursor = db.cursor()
|
60 |
cursor = db.cursor()
|
| 61 |
|
61 |
|
| 62 |
ALL_STORES_SQL = "select * from stores"
|
62 |
ALL_STORES_SQL = "select * from stores"
|
| 63 |
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"
|
63 |
GCM_REG_ID_SQL1 = "select x.user_id, x.gcm_regid, x.id, x.androidid, x.created from (select gc.* from gcm_users gc join users u on gc.user_id=u.id where gc.user_id in (%s) and gc.androidid is not null and u.activated=1 order by gc.id desc) as x group by x.user_id, x.gcm_regid, x.androidid"
|
| 64 |
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"
|
64 |
GCM_REG_ID_SQL2 = "select x.user_id, x.gcm_regid, x.id, x.androidid, x.created, x.imeinumber from (select gc.* from gcm_users gc join users u on u.id=gc.user_id where gc.user_id in (%s) and gc.androidid is null and gc.imeinumber and u.activated=1 is not null order by id desc) as x group by x.user_id, x.imeinumber"
|
| 65 |
FETCH_GCM_REG_SQL = "select id, gcm_regid from gcm_users where id in (%s)"
|
65 |
FETCH_GCM_REG_SQL = "select id, gcm_regid from gcm_users where id in (%s)"
|
| 66 |
|
66 |
|
| 67 |
cursor.execute(ALL_STORES_SQL)
|
67 |
cursor.execute(ALL_STORES_SQL)
|
| 68 |
result_stores = cursor.fetchall()
|
68 |
result_stores = cursor.fetchall()
|
| 69 |
domainStoresMap = {}
|
69 |
domainStoresMap = {}
|