|
@@ -1945,7 +1945,7 @@ def get_stock_players(**kwargs):
|
|
|
if today_record:
|
|
|
today_record["today_stock_img"] = json.loads(today_record["today_stock_img"]) if today_record["today_stock_img"] else []
|
|
|
today_stock = json.loads(today_record["today_stock"]) if today_record["today_stock"] else []
|
|
|
- today_stock = list(filter(lambda x:float(x.get("fund",0))>0.0,today_stock))
|
|
|
+ today_stock = list(filter(lambda x:float(x.get("fund",0) if x.get('fund') else 0)>0.0,today_stock))
|
|
|
today_record["today_stock"] = today_stock
|
|
|
today_record["today_income"] = "{}%".format(today_record["today_income"]*100)
|
|
|
today_record["total_income"] = "{}%".format(today_record["total_income"]*100)
|
|
@@ -2933,7 +2933,7 @@ def get_article_info(**kwargs):
|
|
|
_id = kwargs.get("id")
|
|
|
rst = cm.Article.objects.filter(id=_id).values().first()
|
|
|
rst["url"] = "https://api.hunanwanzhu.com/topic/share/article.html?id="+str(_id)
|
|
|
- rst["web"] = "https://test.hunanwanzhu.com/topic/share/articleweb.html?id="+str(_id)
|
|
|
+ rst["web"] = "https://api.hunanwanzhu.com/topic/share/articleweb.html?id="+str(_id)
|
|
|
return rst
|
|
|
|
|
|
|
|
@@ -3555,6 +3555,7 @@ def get_match_group_winlose_statistic(**qdata):
|
|
|
rst = {"group_win_lose_list":group_win_lose_list,
|
|
|
"win_cnt":win_cnt,"lose_cnt":lose_cnt,
|
|
|
"total_fund":total_fund,
|
|
|
+ "date":today,
|
|
|
"today_win_lose_avg":today_win_lose_avg}
|
|
|
|
|
|
return rst
|
|
@@ -3780,8 +3781,8 @@ def get_user_markscore_week_avg(request):
|
|
|
# qset = cm.UserMarkScore.objects.filter(stock_date=now_str).aggregate(avg_score=Avg("score"))
|
|
|
# item_list.append({"stock_date":now_str,"avg_score":qset.get("avg_score",0)})
|
|
|
# data.append(item_list)
|
|
|
-
|
|
|
- return data
|
|
|
+ count = (len(data)%5) + 30
|
|
|
+ return data[:count]
|
|
|
|
|
|
|
|
|
|