fix: 订单列表、超管1383714110、财务szjilu累计、俱乐部配置API
This commit is contained in:
@@ -7042,8 +7042,9 @@ class KefuGetOrderListView(APIView):
|
||||
clkf = request.data.get('clkf', '').strip()
|
||||
|
||||
# ---------- 查询条件 ----------
|
||||
# 基础条件:平台发单 + 非跨平台
|
||||
base_q = Q(Platform=1)
|
||||
# 基础条件:平台发单 + 兼容历史 Platform 为空
|
||||
from jituan.services.club_context import platform_order_base_q
|
||||
base_q = platform_order_base_q()
|
||||
|
||||
if dingdan_id:
|
||||
q_conditions = base_q & Q(OrderID=dingdan_id)
|
||||
@@ -7102,6 +7103,9 @@ class KefuGetOrderListView(APIView):
|
||||
|
||||
list_qs = filtered_orders.order_by('-CreateTime')
|
||||
total_count, orders_page = paginate_fluent_query(list_qs, page, page_size)
|
||||
if total_count > 0 and not orders_page:
|
||||
start = (max(1, page) - 1) * page_size
|
||||
orders_page = list(list_qs._qs[start:start + page_size])
|
||||
|
||||
order_ids = [o.OrderID for o in orders_page if o.OrderID]
|
||||
ext_map = {}
|
||||
@@ -7214,8 +7218,8 @@ class KefuGetShangjiaOrderListView(APIView):
|
||||
shangjia_nicheng = request.data.get('shangjia_nicheng', '').strip()
|
||||
|
||||
# ---------- 查询条件 ----------
|
||||
# 基础条件:商家发单 + 非跨平台
|
||||
base_q = Q(Platform=2)
|
||||
from jituan.services.club_context import merchant_order_base_q
|
||||
base_q = merchant_order_base_q()
|
||||
|
||||
if dingdan_id:
|
||||
q_conditions = base_q & Q(OrderID=dingdan_id)
|
||||
@@ -7277,6 +7281,9 @@ class KefuGetShangjiaOrderListView(APIView):
|
||||
|
||||
list_qs = filtered_orders.order_by('-CreateTime')
|
||||
total_count, orders_page = paginate_fluent_query(list_qs, page, page_size)
|
||||
if total_count > 0 and not orders_page:
|
||||
start = (max(1, page) - 1) * page_size
|
||||
orders_page = list(list_qs._qs[start:start + page_size])
|
||||
|
||||
order_ids = [o.OrderID for o in orders_page if o.OrderID]
|
||||
ext_map = {}
|
||||
|
||||
Reference in New Issue
Block a user