fix: 后台添加角色按客服账号定位;下单OpenID字段名修正

This commit is contained in:
XingQue
2026-06-21 00:23:19 +08:00
parent 4f6c06a488
commit 2ce2aad956
2 changed files with 9 additions and 5 deletions

View File

@@ -765,8 +765,8 @@ class CreateOrderView(APIView):
with transaction.atomic():
# 获取当前用户信息
current_user = request.user
laoban_yonghuid = getattr(current_user, 'yonghuid', '')
user_openid = getattr(current_user, 'openid', '')
laoban_yonghuid = getattr(current_user, 'UserUID', '') or getattr(current_user, 'yonghuid', '')
user_openid = getattr(current_user, 'OpenID', '') or getattr(current_user, 'openid', '')
if not user_openid:
return Response({'code': 10, 'msg': '用户openid不存在', 'data': None})