|
@@ -10,7 +10,7 @@ from django.shortcuts import render
|
|
|
from django.views.generic import TemplateView
|
|
|
|
|
|
from azoauth.config import *
|
|
|
-from model.models import UserModel, UidRtspModel, AlexaAuthModel, UserCountModel, SwitchModel
|
|
|
+from model.models import UserModel, UidRtspModel, AlexaAuthModel, SwitchModel
|
|
|
from object.RedisObject import RedisObject
|
|
|
from object.ResObject import ResObject
|
|
|
from object.ResponseObject import ResponseObject
|
|
@@ -168,13 +168,13 @@ class loginHandleView(TemplateView):
|
|
|
UserModel.objects.create(userID=userID, region_code=region_code, code=code, addTime=nowTime,
|
|
|
updTime=nowTime)
|
|
|
year_month = str(time.strftime('%Y%m', time.localtime(nowTime))) # 获取当前年月
|
|
|
- user_count_qs = UserCountModel.objects.filter(skill_name=skill_name, year_month=year_month).values('amount')
|
|
|
- if not user_count_qs.exists():
|
|
|
- UserCountModel.objects.create(skill_name=skill_name, year_month=year_month, amount=1)
|
|
|
- else:
|
|
|
- # 用户数量+1
|
|
|
- amount = user_count_qs[0]['amount'] + 1
|
|
|
- user_count_qs.update(amount=amount)
|
|
|
+ # user_count_qs = UserCountModel.objects.filter(skill_name=skill_name, year_month=year_month).values('amount')
|
|
|
+ # if not user_count_qs.exists():
|
|
|
+ # UserCountModel.objects.create(skill_name=skill_name, year_month=year_month, amount=1)
|
|
|
+ # else:
|
|
|
+ # # 用户数量+1
|
|
|
+ # amount = user_count_qs[0]['amount'] + 1
|
|
|
+ # user_count_qs.update(amount=amount)
|
|
|
|
|
|
redirect_uri += '?code=' + code + '&state=' + state
|
|
|
logger.info('------认证登录响应------:{}'.format(redirect_uri))
|