fix: 假单头像beijing路径;JD前缀假单统一拒绝抢单
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,7 +7,7 @@ from django.utils import timezone
|
|||||||
|
|
||||||
from orders.models import FakeGrabOrder
|
from orders.models import FakeGrabOrder
|
||||||
|
|
||||||
DEFAULT_AVATAR = 'a_long/morentouxiang.jpg'
|
DEFAULT_AVATAR = 'beijing/morentouxiang.jpg'
|
||||||
|
|
||||||
COMMON_TAIL = (
|
COMMON_TAIL = (
|
||||||
'下单凑七套,不卡保底,不要私藏变卖,私藏变卖老板必退款,'
|
'下单凑七套,不卡保底,不要私藏变卖,私藏变卖老板必退款,'
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ from jituan.services.club_context import resolve_effective_club_id
|
|||||||
from jituan.services.dashou_exam import user_has_active_member
|
from jituan.services.dashou_exam import user_has_active_member
|
||||||
from orders.models import FakeGrabOrder
|
from orders.models import FakeGrabOrder
|
||||||
|
|
||||||
DEFAULT_DISPATCHER_AVATAR = 'a_long/morentouxiang.jpg'
|
DEFAULT_DISPATCHER_AVATAR = 'beijing/morentouxiang.jpg'
|
||||||
|
|
||||||
|
|
||||||
def dashou_should_use_fake_pool(user):
|
def dashou_should_use_fake_pool(user):
|
||||||
@@ -48,6 +48,7 @@ def _random_display_time_str():
|
|||||||
|
|
||||||
def _format_fake_row(row, display_time=None):
|
def _format_fake_row(row, display_time=None):
|
||||||
"""字段与 DashouDingdanHuoquView 真实单列表保持一致。"""
|
"""字段与 DashouDingdanHuoquView 真实单列表保持一致。"""
|
||||||
|
# 平台单用 tupian、商家单用 tupian + sj_avatar,统一默认头像
|
||||||
avatar = DEFAULT_DISPATCHER_AVATAR
|
avatar = DEFAULT_DISPATCHER_AVATAR
|
||||||
platform = int(row.Platform or 1)
|
platform = int(row.Platform or 1)
|
||||||
oid = row.OrderID
|
oid = row.OrderID
|
||||||
|
|||||||
6
orders/sql/update_fake_grab_order_avatar.sql
Normal file
6
orders/sql/update_fake_grab_order_avatar.sql
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
-- 假单表 fake_grab_order:派单者头像字段 paidan_touxiang 全部改为 beijing 默认头像
|
||||||
|
-- 执行前可先预览:
|
||||||
|
-- SELECT id, dingdan_id, paidan_touxiang FROM fake_grab_order;
|
||||||
|
|
||||||
|
UPDATE fake_grab_order
|
||||||
|
SET paidan_touxiang = 'beijing/morentouxiang.jpg';
|
||||||
@@ -3667,6 +3667,10 @@ class QiangdanView(APIView):
|
|||||||
if not dingdan_id:
|
if not dingdan_id:
|
||||||
return Response({'code': 400, 'msg': '订单ID不能为空'}, status=400)
|
return Response({'code': 400, 'msg': '订单ID不能为空'}, status=400)
|
||||||
|
|
||||||
|
dingdan_id = str(dingdan_id).strip()
|
||||||
|
if dingdan_id.upper().startswith('JD'):
|
||||||
|
return Response({'code': 400, 'msg': '您没充值会员或保证金不可接单'})
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
# 1. 验证打手身份和状态
|
# 1. 验证打手身份和状态
|
||||||
|
|||||||
Reference in New Issue
Block a user