fix: 自动结算写入对齐 USE_TZ;lxs 打手注册同步开通管事
order_deal 不再 make_aware 入库以免 MySQL 报错;龙先生打手注册成功时创建管事且邀请人与打手相同。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -580,7 +580,11 @@ class DashouZhuceView(APIView):
|
||||
pass
|
||||
|
||||
|
||||
# 5.3 创建管事扩展表
|
||||
# 5.3 龙先生:同步开通管事,邀请人与打手邀请人相同
|
||||
from users.services.lxs_dashou_guanshi import ensure_lxs_guanshi_on_dashou_register
|
||||
ensure_lxs_guanshi_on_dashou_register(
|
||||
current_user, guanshi_yonghuid, club_id,
|
||||
)
|
||||
|
||||
# 5.4 更新主表的用户类型 (如果需要,可以设为'dashou',或保持原逻辑)
|
||||
# current_user.UserType = 'dashou' # 根据你的业务逻辑决定
|
||||
@@ -613,10 +617,14 @@ class DashouZhuceView(APIView):
|
||||
|
||||
# 6. 注册成功,返回信息 (新注册用户没有会员记录,clumber返回空列表)
|
||||
fanhui_data = self.zhuangbeiFanhuiShuju(dashou_profile, current_user, is_new=True)
|
||||
if (club_id or '').strip() == 'lxs':
|
||||
ok_msg = '注册成功!已开通打手、管事身份。'
|
||||
else:
|
||||
ok_msg = '注册成功!'
|
||||
return Response({
|
||||
'code': 200,
|
||||
'message': '注册成功!已开通打手、管事身份。',
|
||||
'msg': '注册成功!已开通打手、管事身份。',
|
||||
'message': ok_msg,
|
||||
'msg': ok_msg,
|
||||
'data': fanhui_data
|
||||
})
|
||||
|
||||
@@ -921,7 +929,11 @@ class WechatLoginAndDashouRegisterView(APIView):
|
||||
|
||||
# 创建商家扩展表
|
||||
|
||||
# 创建管事扩展表
|
||||
# 龙先生:同步开通管事,邀请人与打手邀请人相同
|
||||
from users.services.lxs_dashou_guanshi import ensure_lxs_guanshi_on_dashou_register
|
||||
ensure_lxs_guanshi_on_dashou_register(
|
||||
user_main, guanshi_yonghuid, club_id,
|
||||
)
|
||||
|
||||
# 更新原管事的邀请数量
|
||||
locked_guanshi = UserGuanshi.objects.select_for_update().get(pk=guanshi_profile.pk)
|
||||
@@ -946,9 +958,13 @@ class WechatLoginAndDashouRegisterView(APIView):
|
||||
# 6. 准备返回数据
|
||||
response_data = self.zhuangbeiFanhuiShuju(user_main, dashou_profile, token)
|
||||
|
||||
if (club_id or '').strip() == 'lxs':
|
||||
ok_msg = '登录并注册成功!已开通打手、管事等身份。'
|
||||
else:
|
||||
ok_msg = '登录并注册成功!'
|
||||
return Response({
|
||||
'code': 0,
|
||||
'msg': '登录并注册成功!已开通打手、管事等身份。',
|
||||
'msg': ok_msg,
|
||||
'data': response_data
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user