|
@@ -668,11 +668,6 @@ def add_model(cls,**kwargs):
|
|
|
if match.end_time < now_date:
|
|
|
raise ce.TipException(u"该比赛已结束或您未参加此次比赛不能提交数据!")
|
|
|
|
|
|
- cm.PlayerRecord.objects.filter(match_id=match_id,player_id=player_id,stock_date=stock_date).delete()
|
|
|
- yesterday_date = (datetime.datetime.now()-datetime.timedelta(days=1)).strftime("%Y-%m-%d")
|
|
|
- yesterday = cm.PlayerRecord.objects.filter(
|
|
|
- match_id=match_id,player_id=player_id).exclude(stock_date=stock_date).order_by("-stock_date").first()
|
|
|
-
|
|
|
validdates = get_match_validdates(match_id)
|
|
|
today_index = validdates.index(stock_date)
|
|
|
yesterday_index = today_index -1 if today_index >=1 else 0
|
|
@@ -686,7 +681,6 @@ def add_model(cls,**kwargs):
|
|
|
yesterday_stock_img = yesterday.today_stock_img
|
|
|
yesterday_is_markt = yesterday.is_markt
|
|
|
else:
|
|
|
- #yesterday_fund = init_fund #today_fund
|
|
|
yesterday_fund = today_fund
|
|
|
yesterday_stock = ""
|
|
|
yesterday_stock_img = ""
|
|
@@ -1305,7 +1299,10 @@ def get_hot_follow(**kwargs):
|
|
|
userinfo = get_user_info(today_record["user_id"])
|
|
|
|
|
|
win_rate = ccc.cache.hget("PLAYER_LATEST_%d"%today_record["player_id"],"win_rate")
|
|
|
- win_rate = str(float(win_rate)*100)+"%"
|
|
|
+ try:
|
|
|
+ win_rate = str(float(win_rate)*100)+"%"
|
|
|
+ except:
|
|
|
+ pass
|
|
|
if userinfo:
|
|
|
data.append(
|
|
|
{
|
|
@@ -2247,6 +2244,7 @@ def add_zan(request):
|
|
|
def get_experience_list(request):
|
|
|
"""
|
|
|
"""
|
|
|
+ #return 0,[]
|
|
|
kwargs = request.json
|
|
|
today = get_today_date()
|
|
|
print(today,22222222222)
|