update 升降配
This commit is contained in:
parent
5ef36caa71
commit
cf47ee13db
@ -75,7 +75,7 @@ async def affirmbz_order(ns={}):
|
||||
await sor.U('customer_goods', {'id': resource_find_id, 'del_flg': '1'})
|
||||
|
||||
# 处理续费逻辑
|
||||
elif order_type == 'RENEW':
|
||||
elif order_type == 'RENEW' or order_type == 'DILATATION':
|
||||
# 找到资源并更新时间
|
||||
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, {})
|
||||
@ -488,6 +488,8 @@ async def get_baidu_orderlist(ns={}):
|
||||
business_op = 'BUY'
|
||||
elif order_type == 'RENEW':
|
||||
business_op = 'RENEW'
|
||||
elif order_type == 'DILATATION':
|
||||
business_op = 'DILATATION'
|
||||
elif order_type == 'REFUND':
|
||||
business_op = 'BUY_REVERSE'
|
||||
else:
|
||||
@ -498,6 +500,8 @@ async def get_baidu_orderlist(ns={}):
|
||||
'reason': '支付形式目前仅包含购买,续费,退订'
|
||||
}
|
||||
await user_action_record(ns_record)
|
||||
# 取消订单
|
||||
await baidu_order_cancel({'baidu_id': baidu_users[0]['baidu_id'], 'order_id': ns.get('order_id')})
|
||||
return {
|
||||
'status': False,
|
||||
'msg': '线上暂不支持, 请联系售后'
|
||||
@ -605,8 +609,11 @@ async def get_baidu_orderlist(ns={}):
|
||||
with open('baidu_error.log', 'a') as f:
|
||||
f.write('保存配置configurations失败' + str(e) + '\n')
|
||||
|
||||
if order_type == 'DILATATION':
|
||||
# 暂时不确定升降配是否需要重新计算日期
|
||||
pass
|
||||
# 如果是续费订单 由于没有返回日期, 重新计算日期
|
||||
if order_type == 'RENEW':
|
||||
elif order_type == 'RENEW':
|
||||
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, {})
|
||||
|
||||
@ -178,7 +178,7 @@ async def getbz_order(ns={}):
|
||||
'BUY': '购买',
|
||||
'RENEW': '续费',
|
||||
'BUY_REVERSE': '退款',
|
||||
# 'UPGRADE': '升级'
|
||||
'DILATATION': '升降配'
|
||||
}
|
||||
item['business_op_text'] = business_op_mapping.get(item['business_op'], item['business_op'])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user