feat: 商家子客服 merchant_ops 模块与专用 API
This commit is contained in:
@@ -4899,6 +4899,16 @@ class ShangjiaZhuceView(APIView):
|
||||
# 用户不是商家,继续注册流程
|
||||
pass
|
||||
|
||||
# 2.5 子客服身份互斥:有效客服不可认证商家
|
||||
from merchant_ops.services.authz import assert_no_active_staff_when_merchant_register
|
||||
try:
|
||||
assert_no_active_staff_when_merchant_register(current_user)
|
||||
except Exception as e:
|
||||
from merchant_ops.services.authz import StaffAuthError
|
||||
if isinstance(e, StaffAuthError):
|
||||
return Response({'code': 403, 'message': e.msg, 'data': None}, status=status.HTTP_403_FORBIDDEN)
|
||||
raise
|
||||
|
||||
# 3. 根据邀请码查找对应的管理员
|
||||
try:
|
||||
# 从管理员表查找邀请码
|
||||
|
||||
Reference in New Issue
Block a user