进行了 GVSDSDK 迁移,可能存在诸多问题
This commit is contained in:
@@ -11,7 +11,8 @@ from .models import (
|
||||
YonghuChenghao, Chenghao, KaoheCishuFeiyong, KaoheJujueJilu,
|
||||
KaoheguanBankuai, Bankuai, ShenheJilu, KaoheJiluFeiyong
|
||||
)
|
||||
from users.models import UserShenheguan, UserMain, UserDashou
|
||||
from users.models import UserShenheguan, UserDashou
|
||||
from gvsdsdk.models import User
|
||||
from products.models import ShangpinLeixing
|
||||
|
||||
|
||||
@@ -248,7 +249,7 @@ class ShenheDatingDataView(APIView):
|
||||
|
||||
records = []
|
||||
for jl in jilu_list:
|
||||
user = UserMain.objects.filter(yonghuid=jl.shenqingren_id).first()
|
||||
user = User.objects.filter(yonghuid=jl.shenqingren_id).first()
|
||||
avatar = user.avatar if user else ''
|
||||
texiao_json = {}
|
||||
if jl.chenghao and jl.chenghao.texiao_miaoshu:
|
||||
@@ -387,7 +388,7 @@ class ShenheXiangqingView(APIView):
|
||||
|
||||
records = []
|
||||
for jl in jilu_list:
|
||||
user = UserMain.objects.filter(yonghuid=jl.shenqingren_id).first()
|
||||
user = User.objects.filter(yonghuid=jl.shenqingren_id).first()
|
||||
avatar = user.avatar if user else ''
|
||||
texiao_json = {}
|
||||
if jl.chenghao and jl.chenghao.texiao_miaoshu:
|
||||
@@ -494,7 +495,7 @@ class ShenheCaozuoView(APIView):
|
||||
|
||||
# 授予标签
|
||||
if jilu.chenghao:
|
||||
yh = UserMain.objects.get(yonghuid=jilu.shenqingren_id)
|
||||
yh = User.objects.get(yonghuid=jilu.shenqingren_id)
|
||||
if not YonghuChenghao.objects.filter(yonghu=yh, chenghao=jilu.chenghao).exists():
|
||||
YonghuChenghao.objects.create(yonghu=yh, chenghao=jilu.chenghao)
|
||||
# 如果标签开启了金牌,同步更新打手称号
|
||||
@@ -698,7 +699,7 @@ class KaoheJiluView(APIView):
|
||||
fail_reason = last_fail.yuanyin if last_fail else ''
|
||||
|
||||
# 考核官头像
|
||||
kg_user = UserMain.objects.filter(yonghuid=jl.shenheguan_id).first()
|
||||
kg_user = User.objects.filter(yonghuid=jl.shenheguan_id).first()
|
||||
kg_avatar = kg_user.avatar if kg_user else ''
|
||||
|
||||
data.append({
|
||||
@@ -881,7 +882,7 @@ class KaoheJiluListView(APIView):
|
||||
applicant_ids = {j.shenqingren_id for j in jilu_list}
|
||||
user_map = {}
|
||||
if applicant_ids:
|
||||
users = UserMain.objects.filter(yonghuid__in=applicant_ids).select_related('dashou_profile')
|
||||
users = User.objects.filter(yonghuid__in=applicant_ids).select_related('dashou_profile')
|
||||
for u in users:
|
||||
avatar = u.avatar or ''
|
||||
nicheng = ''
|
||||
|
||||
Reference in New Issue
Block a user