Browse Source

后台UserStock

xjconline 4 months ago
parent
commit
5ae8884133
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/manage/controls.py

+ 1 - 0
src/manage/controls.py

@@ -1419,6 +1419,7 @@ def update_stock_usernum(**kwargs):
     """
     """
     stock_date = kwargs.get("stock_date")
+    month = "%s%s" % (stock_date.split("-")[0],stock_date.split("-")[1])
     qset = cm.UserStock.objects.filter(stock_date=stock_date,fund__gt=0)
     qset = qset.values("stock_id","stock_name").annotate(count=Count("stock_id"),total_fund=Sum("fund")).order_by("-count")
     cm.Stock.objects.update(stock_date=None)