fix: 假单后台不再从 fake_order_pool 导入已删除的 _scope_key
This commit is contained in:
@@ -14,7 +14,7 @@ from jituan.services.club_context import (
|
||||
)
|
||||
from jituan.services.club_user_access import list_response_meta
|
||||
from orders.models import FakeGrabOrder, FakeGrabOrderShuffleState
|
||||
from orders.services.fake_order_pool import DEFAULT_DISPATCHER_AVATAR, _scope_key
|
||||
from orders.services.fake_order_pool import DEFAULT_DISPATCHER_AVATAR
|
||||
from products.models import ShangpinLeixing
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -25,6 +25,12 @@ PRODUCT_PERMS = ('2200a',)
|
||||
SHUFFLE_STATE_PK = 1
|
||||
|
||||
|
||||
def _scope_key(club_id, leixing_id):
|
||||
"""与历史打乱缓存 key 一致:club|leixing。"""
|
||||
lid = leixing_id if leixing_id is not None else 'all'
|
||||
return f'{club_id}|{lid}'
|
||||
|
||||
|
||||
def club_read_blocked(request):
|
||||
return resolve_club_scope(request) == DATA_SCOPE_ALL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user