feat: 打手抢单大厅默认关闭假单展示,保留开关可恢复

通过 FAKE_GRAB_ORDER_POOL_ENABLED 控制,False 时仅返回真实订单,后台假单管理功能不变。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-13 15:29:27 +08:00
parent 80cca803f8
commit ce8bda52d3
2 changed files with 6 additions and 2 deletions

View File

@@ -97,12 +97,14 @@ class DashouDingdanHuoquView(APIView):
def post(self, request):
try:
from django.conf import settings
from orders.services.fake_order_pool import (
dashou_should_use_fake_pool,
build_fake_order_pool_response,
)
if dashou_should_use_fake_pool(request.user):
return build_fake_order_pool_response(request)
if getattr(settings, 'FAKE_GRAB_ORDER_POOL_ENABLED', False):
if dashou_should_use_fake_pool(request.user):
return build_fake_order_pool_response(request)
# 1. 获取请求参数
data = request.data