diff --git a/b/baiduc/baidu_confirm_refund_order.dspy b/b/baiduc/baidu_confirm_refund_order.dspy index 10cf3d7..d7fd76c 100644 --- a/b/baiduc/baidu_confirm_refund_order.dspy +++ b/b/baiduc/baidu_confirm_refund_order.dspy @@ -110,7 +110,7 @@ async def affirmbz_order(ns={}): return {'status': True, 'msg': '支付成功'} except Exception as error: await sor.rollback() - raise error + return {'status': False, 'msg': str(error)} async def baidu_new_update_resouce(ns={}): @@ -615,9 +615,12 @@ async def get_baidu_orderlist(ns={}): # 更新资源时间 资源id # if order_type == 'NEW': # await baidu_new_update_resouce(ns) + # with open('baiducloud_orderlist.log', 'a+') as f: + # now_time = time.strftime('%Y-%m-%d %H:%M:%S') + # f.write(now_time + str({'orderid': bz_ns.get('id'), 'originalprice': bz_ns.get('originalprice'), 'servicename': bz_ns.get('servicename'), 'amount': total_price})) return { 'status': True, - 'orderid': bz_ns['id'], + 'orderid': bz_ns.get('id'), 'originalprice': bz_ns.get('originalprice'), 'servicename': bz_ns.get('servicename'), 'amount': total_price @@ -713,7 +716,7 @@ async def update_baidu_order_list(ns={}): async def baidu_confirm_refund_order(ns={}): # ns = { - # 'order_id': ["03ee8d08da79458b8f8d3157d3498330", "e711729606024080bf9613d975294616"], + # 'order_id': ["13f3518648054796abf7f3d00ed611bf"], # 'userid': 'KsKhCUPizQyGiw3L1WVRy' # } import asyncio