xjc 1 ano atrás
pai
commit
8e9f35b223
1 arquivos alterados com 2 adições e 3 exclusões
  1. 2 3
      src/weixin/controls.py

+ 2 - 3
src/weixin/controls.py

@@ -3444,7 +3444,6 @@ def get_match_group_winlose_statistic(**qdata):
         match_group_dct[item.id] = item.name
         match_group_status_dct[item.id] = item.is_active
 
-    print(today)
     prset = cm.PlayerRecord.get_db_model(match_id).objects.filter(match_id=match_id,stock_date=today)
 
     group_win_lose_list = []
@@ -3581,13 +3580,13 @@ def get_match_group_winlose_avg_allday(**qdata):
     allday_winlose_avg_list = []
     for stock_date in all_day: 
         #今日全部人均收益率
-        total = prset.filter(stock_date=stock_date).aggregate(total=Sum("today_income")).get("total")
+        prset = cm.PlayerRecord.get_db_model(match_id).objects.filter(match_id=match_id,stock_date=stock_date)
+        total = prset.aggregate(total=Sum("today_income")).get("total")
         today_win_lose_avg = "{}%".format(round(total/prset.count()*100,2)) if prset.count()>0 else 0.0
         allday_winlose_avg_list.append({
             "stock_date":stock_date,     
             "today_income":today_win_lose_avg,     
         })
-
     allday_winlose_avg_list = sorted(allday_winlose_avg_list,key=lambda x:x["stock_date"],reverse=True)
     rst = {"list":allday_winlose_avg_list}
     return rst