fix: 充值履约幂等加固(会员/押金/积分),后台加会员club_id
This commit is contained in:
@@ -1256,7 +1256,7 @@ class KefuUpdateDashouView(APIView):
|
||||
|
||||
# ---------- 会员操作 ----------
|
||||
elif caozuo == 'jia_huiyuan':
|
||||
if '001ff' not in permissions:
|
||||
if '001ff' not in permissions and '000001' not in permissions:
|
||||
return Response({'code': 403, 'msg': '无权限给打手加会员'})
|
||||
if not huiyuan_id:
|
||||
return Response({'code': 400, 'msg': '缺少会员ID'})
|
||||
@@ -1265,6 +1265,8 @@ class KefuUpdateDashouView(APIView):
|
||||
huiyuan = Huiyuan.query.get(huiyuan_id=huiyuan_id)
|
||||
except Huiyuan.DoesNotExist:
|
||||
return Response({'code': 404, 'msg': '会员类型不存在'})
|
||||
from jituan.services.club_user import get_user_club_id
|
||||
player_club = get_user_club_id(dashou_user)
|
||||
record, created = Huiyuangoumai.objects.select_for_update().get_or_create(
|
||||
yonghu_id=dashou_id,
|
||||
huiyuan_id=huiyuan_id,
|
||||
@@ -1272,6 +1274,7 @@ class KefuUpdateDashouView(APIView):
|
||||
'huiyuan_zhuangtai': 1,
|
||||
'jieshao': huiyuan.jieshao,
|
||||
'daoqi_time': timezone.now() + timedelta(days=days),
|
||||
'club_id': player_club,
|
||||
}
|
||||
)
|
||||
if not created:
|
||||
|
||||
Reference in New Issue
Block a user