|
@@ -1419,6 +1419,7 @@ def update_stock_usernum(**kwargs):
|
|
"""
|
|
"""
|
|
"""
|
|
"""
|
|
stock_date = kwargs.get("stock_date")
|
|
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 = 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")
|
|
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)
|
|
cm.Stock.objects.update(stock_date=None)
|