main #5
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
.idea/
|
||||
.DS_Store
|
||||
*.tar
|
||||
*.tar.gz
|
||||
*.rar
|
||||
__pycache__/
|
||||
@ -76,7 +76,7 @@ async def affirmbz_order(ns={}):
|
||||
# 处理续费逻辑
|
||||
elif order_type == 'RENEW':
|
||||
# 找到资源并更新时间
|
||||
resource_find_sql = """select id from customer_goods where resourceid = '%s' and del_flg = '0';""" % j['resourceids']
|
||||
resource_find_sql = """select id from customer_goods where FIND_IN_SET('%s', resourceid) and del_flg = '0';""" % j['resourceids']
|
||||
resource_find_li = await sor.sqlExe(resource_find_sql, {})
|
||||
resource_find_id = resource_find_li[0]['id']
|
||||
await sor.U('customer_goods', {'id': resource_find_id, 'start_date': j['resourcestarttime'], 'expire_date': j['resourceendtime']})
|
||||
@ -109,7 +109,7 @@ async def affirmbz_order(ns={}):
|
||||
await sor.C('customer_goods', nss)
|
||||
return {'status': True, 'msg': '支付成功'}
|
||||
except Exception as error:
|
||||
raise error
|
||||
return {'status': False, 'msg': str(error)}
|
||||
|
||||
async def baidu_new_update_resouce(ns={}):
|
||||
|
||||
@ -413,7 +413,7 @@ async def get_baidu_orderlist(ns={}):
|
||||
|
||||
# 如果是续费订单 由于没有返回日期, 重新计算日期
|
||||
if order_type == 'RENEW':
|
||||
history_time_sql = "select resourcestarttime, resourceendtime from order_goods where resourceids = '%s' order by resourceendtime desc;" % \
|
||||
history_time_sql = "select resourcestarttime, resourceendtime from order_goods where FIND_IN_SET('%s', resourceids) order by resourceendtime desc;" % \
|
||||
nss['resourceids']
|
||||
history_time = await sor.sqlExe(history_time_sql, {})
|
||||
new_end_time = await cal_expire_time(history_time=history_time[0]['resourceendtime'],
|
||||
@ -485,7 +485,7 @@ async def get_baidu_orderlist(ns={}):
|
||||
'orderid': ns.get('order_id'),
|
||||
'ordertype': orders[0]['type'],
|
||||
'userid': ns.get('userid'),
|
||||
'reason': '支付错误, 请联系售后'
|
||||
'reason': '支付错误, 请联系售后, %s' % affirmbz_order_res.get('msg')
|
||||
}
|
||||
await user_action_record(ns_record)
|
||||
return {
|
||||
|
||||
@ -69,7 +69,7 @@ async def get_resource_expire_time(ns={}):
|
||||
baidu_r = {
|
||||
'id': uuid(),
|
||||
'name': baidubaidu_resource['serviceTypeName'],
|
||||
'instanceid': baidubaidu_resource['instanceId'],
|
||||
'instanceid': baidubaidu_resource['shortId'],
|
||||
'status': baidubaidu_resource['status'],
|
||||
'expiretime': await time_convert(baidubaidu_resource['expireTime']),
|
||||
'days': await calculate_time_diff(baidubaidu_resource['expireTime'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user