From cf47ee13db7d0bfdfb1743cc0a83696d9c7182f0 Mon Sep 17 00:00:00 2001 From: ping <1017253325@qq.com> Date: Mon, 1 Jun 2026 15:01:37 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=8D=87=E9=99=8D=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- b/baiducloud/get_baidu_orderlist.dspy | 11 +++++++++-- b/bz_order/getbz_order.dspy | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/b/baiducloud/get_baidu_orderlist.dspy b/b/baiducloud/get_baidu_orderlist.dspy index 5f9e2d0..0f246f7 100644 --- a/b/baiducloud/get_baidu_orderlist.dspy +++ b/b/baiducloud/get_baidu_orderlist.dspy @@ -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, {}) diff --git a/b/bz_order/getbz_order.dspy b/b/bz_order/getbz_order.dspy index 77626ad..eb720eb 100644 --- a/b/bz_order/getbz_order.dspy +++ b/b/bz_order/getbz_order.dspy @@ -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'])