进行了 GVSDSDK 迁移,可能存在诸多问题

This commit is contained in:
2026-06-17 20:37:47 +08:00
parent 72770ad73b
commit d00f0d08e5
132 changed files with 161593 additions and 4827 deletions

View File

@@ -46,8 +46,9 @@ from .models import (
Czjilu, Gsfenhong, Huiyuangoumai, DuociFenhong
)
from users.models import (
UserMain, AdminProfile, UserDashou, UserGuanshi, UserZuzhang, UserShangjia
AdminProfile, UserDashou, UserGuanshi, UserZuzhang, UserShangjia
)
from gvsdsdk.models import User
from orders.models import Lilubiao
from config.models import Szjilu, Gonggao, Lunbo
@@ -5945,7 +5946,7 @@ class ZuzhangFenhongView(APIView):
return {}
# 查询用户主表,并预加载 boss_profile
users = UserMain.query.filter(yonghuid__in=guanshi_ids).select_related(
users = User.query.filter(yonghuid__in=guanshi_ids).select_related(
'boss_profile'
).only(
'yonghuid', 'avatar',
@@ -6008,7 +6009,7 @@ class CzhqdyView(APIView):
{
'id': 1,
'name': '打手佣金抵扣',
'profile_attr': 'dashou_profile', # UserMain 的反向 related_name
'profile_attr': 'dashou_profile', # User 的反向 related_name
'balance_field': 'yue',
'rate_key': '5',
'model': UserDashou,