Subversion Repositories SmartDukaan

Rev

Rev 16339 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 16339 Rev 16340
Line 1... Line 1...
1
import MySQLdb
1
import MySQLdb
2
from shop2020.clients.HelperClient import HelperClient
2
from shop2020.clients.HelperClient import HelperClient
3
from shop2020.thriftpy.utils.ttypes import UserSmsInfo, SmsType
3
from shop2020.thriftpy.utils.ttypes import UserSmsInfo, SmsType
4
 
4
 
5
db = MySQLdb.connect('localhost',"root","shop2020","dtr" )
5
db = MySQLdb.connect('192.168.158.89',"root","shop2020","dtr" )
6
cursor = db.cursor()
6
cursor = db.cursor()
7
 
7
 
8
SMS_DATA_SQL="select us.user_id, ua.account_key, u.mobile_number, us.comment saholic_user_id from user_activity_status us join users u on us.user_id = u.id join usergroups ug on u.usergroup_id = ug.id join user_accounts ua on us.user_id = ua.user_id where comment in ('Uninstall','Probable uninstall') and last_active < '2015-07-01' and ug.groupbasis ='Not_Defined' and ua.account_type ='saholic' and trim(coalesce(u.mobile_number, '')) <>''" 
8
SMS_DATA_SQL="select us.user_id, ua.account_key, u.mobile_number, us.comment saholic_user_id from user_activity_status us join users u on us.user_id = u.id join usergroups ug on u.usergroup_id = ug.id join user_accounts ua on us.user_id = ua.user_id where comment in ('Uninstall','Probable uninstall') and last_active < '2015-07-01' and ug.groupbasis ='Not_Defined' and ua.account_type ='saholic' and trim(coalesce(u.mobile_number, '')) <>''" 
9
        
9
        
10
def send_transaction_sms(customerId, mobileNo, smsText, smsType):
10
def send_transaction_sms(customerId, mobileNo, smsText, smsType):