38 lines
902 B
Python
38 lines
902 B
Python
# -*- coding:utf-8 -*-
|
|
import requests
|
|
import log
|
|
from hashlib import md5
|
|
|
|
|
|
def sendTicketSuccess(website,goodsId,playdate,seat,user):
|
|
_s=seat.split('@')
|
|
salt='3@$%^Anx'
|
|
d = {
|
|
'website':website,
|
|
'goodsName':'',
|
|
'goodsId':goodsId,
|
|
'playTime':playdate,
|
|
'seat':seat,
|
|
'seatGrade':_s[-1],
|
|
'seatId':_s[0],
|
|
'seatPrice':0,
|
|
'userAccount':user,
|
|
'pwd':'',
|
|
'md5public':_s[0],
|
|
'md5result':md5((_s[0]+salt).encode('utf8')).hexdigest()
|
|
}
|
|
log.debug("发送微信提示")
|
|
try:
|
|
k=requests.post("http://ec2-54-180-153-109.ap-northeast-2.compute.amazonaws.com:9898/ticketRecord/wechat/business/addTicketRecord",data=d)
|
|
k=k.json()
|
|
if k['success']==1:
|
|
log.debug('微信记录成功')
|
|
else:
|
|
log.debug('微信记录失败')
|
|
|
|
except:
|
|
log.debug("发送微信提示失败")
|
|
|
|
|
|
|