xjconline vor 2 Jahren
Ursprung
Commit
a389dec85b

+ 0 - 1
src/common/core_views.py

@@ -36,7 +36,6 @@ class CusDjangoJSONEncoder(json.JSONEncoder):
     JSONEncoder subclass that knows how to encode date/time, decimal types and UUIDs.
     """
     def default(self, o):
-        print(o)
         # See "Date Time String Format" in the ECMA-262 specification.
         if isinstance(o, datetime.datetime):
             r = datetime.datetime.strftime(o,'%Y-%m-%d %H:%M:%S')

+ 36 - 2
src/common/models.py

@@ -426,6 +426,8 @@ class Consult(models.Model):
     reply_content = models.TextField(u"回复内容", max_length=255, blank=True,null=True)
     reply_status = models.SmallIntegerField(u"0/未回复,1/已回复",blank=True,null=True,default=0)
     view_status = models.SmallIntegerField(u"0/未读,1/已读",blank=True,null=True,default=0)
+    width = models.IntegerField(u"宽度",blank=True,null=True)
+    height = models.IntegerField(u"高度",blank=True,null=True)
 
     ctime = models.DateTimeField(u"创建时间", auto_now_add=True)
 
@@ -448,6 +450,8 @@ class WanzhuConsult(models.Model):
     reply_status = models.SmallIntegerField(u"0/未回复,1/已回复",blank=True,null=True,default=0)
     pid = models.IntegerField(u"上级id",blank=True,null=True)
     reply_user_id = models.IntegerField(u"回复用户id",blank=True,null=True)
+    width = models.IntegerField(u"宽度",blank=True,null=True)
+    height = models.IntegerField(u"高度",blank=True,null=True)
 
     ctime = models.DateTimeField(u"创建时间", auto_now_add=True)
 
@@ -566,6 +570,36 @@ class UserMatch(models.Model):
 #        abstract = True
 
 
-
-
+class BaikeCategory(models.Model):                                                                                                                                                                                                                                                
+    """百科分类                                                                    
+    """                                                                            
+    name = models.CharField(u"政府名称", max_length=255, blank=True,null=True)  
+    parent_id = models.IntegerField(u"父级id",blank=True,null=True)                
+    parent_name = models.CharField(u"父级名称",blank=True,null=True,max_length=255)
+                                                                                   
+    ctime = models.DateTimeField(u"创建时间",auto_now_add=True)                    
+                                                                                   
+    class Meta:                                                                    
+        db_table = "baike_category"                                                     
+        verbose_name = u"百科分类"                                                 
+        app_label = "common"     
+
+
+class BaikeDetail(models.Model):                                                                                                                                                                                                                                                
+    """百科词条详情                                                                    
+    """                                                                            
+    category_id = models.IntegerField(u"父级id",blank=True,null=True)                
+    name = models.CharField(u"词条名称", max_length=255, blank=True,null=True)  
+    intro = models.CharField(u"词条简介", max_length=255, blank=True,null=True)  
+    content = models.TextField(u"词条详情", max_length=255, blank=True,null=True)  
+    cid = models.IntegerField(u"创建人id",blank=True,null=True)                
+    cname = models.CharField(u"创建人名称", max_length=255, blank=True,null=True)  
+    status = models.SmallIntegerField(u"0/待发布,1/已发布",default=0)
+                                                                                   
+    ctime = models.DateTimeField(u"创建时间",auto_now_add=True)                    
+                                                                                   
+    class Meta:                                                                    
+        db_table = "baike_detail"                                                     
+        verbose_name = u"百科词条详情"                                                 
+        app_label = "common"     
 

+ 36 - 11
src/manage/controls.py

@@ -280,6 +280,8 @@ def delete_model(cls,**kwargs):
         if model_name == "MatchGroup":
             cm.PlayerRecord.objects.filter(match_group__in=ids).delete()
             cm.Player.objects.filter(match_group__in=ids).delete()
+        if model_name == "BaikeCategory":
+            cm.BaikeDetail.objects.filter(category_id__in=ids).delete()
 
     return ids
 
@@ -401,7 +403,6 @@ def get_list_info(cls,**kwargs):
         if kwargs.get("match_id"):
             qset = qset.filter(match_id=kwargs.get("match_id"))
         if kwargs.get("username"):
-            #qset = qset.filter(Q(user_name__icontains=kwargs.get("username"))|Q(phone__icontains=kwargs.get("username"))|Q(transaction_id__icontains=kwargs.get("username")))
             qset = qset.filter(Q(user_name__icontains=kwargs.get("username"))|Q(phone__icontains=kwargs.get("username")))
         if kwargs.get("signup_type"):
             qset = qset.filter(signup_type=kwargs.get("signup_type"))
@@ -417,6 +418,14 @@ def get_list_info(cls,**kwargs):
         if kwargs.get("username"):
             qset = qset.filter(name__icontains=kwargs.get("username"))
 
+    if model_name == "BaikeDetail":
+        if kwargs.get("name"):
+            qset = qset.filter(name__icontains=kwargs.get("name"))
+        if kwargs.get("status"):
+            qset = qset.filter(status=kwargs.get("status"))
+        if kwargs.get("category_id"):
+            qset = qset.filter(category_id=kwargs.get("category_id"))
+
     if model_name == "PlayerRecord":
         data = list(qset.order_by("-total_income").values())
     else:
@@ -435,12 +444,6 @@ def get_list_info(cls,**kwargs):
                     item["openid"] = user["openid"]
                     item["player_type"] = user["player_type"]
                     item["phone"] = user["phone"]
-                    #try:
-                    #    item["match_group"] = int(item["match_group"])
-                    #    item["match_group_name"] = cm.MatchGroup.objects.filter(id=int(item["match_group"])).first().name
-                    #except:
-                    #    pass
-                #cm.Player.objects.filter(id=item["id"]).update(username=user.username,usercode=user.usercode)
         if model_name == "PlayerRecord":
             for item in data:
                 user = cm.UserInfo.objects.filter(id=item["user_id"]).first()
@@ -504,11 +507,7 @@ def get_list_info(cls,**kwargs):
                 item["usercode"] = user.usercode
 
             if kwargs.get("username"):
-                print(111111111111111111)
-                print(data)
-                print(kwargs.get("username"))
                 data = filter(lambda x:x["username"] == str(kwargs.get("username")) or kwargs.get("username") ==x["usercode"],data)
-                print(data,22222222222222)
 
         return (total,data)
     else:
@@ -968,3 +967,29 @@ def batch_update_player_latest(record):
         #win_rate = wincnt/float(total) if total else 0.0
         #win_rate = round(win_rate,3)
         #ccc.cache.hset(key,"win_rate",win_rate)
+
+def get_sub_category(pid):
+    """
+    """
+    qset = cm.BaikeCategory.objects.filter(parent_id=pid)
+    qdata = list(qset.values())
+    if qdata:
+        for subitem in qdata:
+            subitem["type"] = "ent"
+            subitem["children"] = get_sub_category(subitem["id"])                                                                    
+    return qdata
+
+def get_baike_category_tree(**kwargs):
+	"""
+	"""
+	parents = list(cm.BaikeCategory.objects.filter(parent_id__isnull=True).values())
+	for item in parents:
+		item["children"] = get_sub_category(item["id"])
+	return parents
+
+
+def get_baike_list_by_category(**kwargs):
+    category_id = kwargs.get("category_id")
+    qset = cm.BaikeDetail.objects.filter(category_id=category_id)
+    data = list(qset.values("id","name"))
+    return data

+ 4 - 0
src/manage/urls_backstage.py

@@ -52,6 +52,10 @@ urlpatterns = [
     url(r'^user/fundinout$', views.FundInOutView.as_view()),
     url(r'^user/fundinout/list$', views.FundInOutListView.as_view()),
     url(r'^user/consult/detail$', views.UserConsultDetailView.as_view()),
+    url(r'^baike/category$', views.BaikeCategoryView.as_view()),
+    url(r'^baike/category/list$', views.BaikeCategoryListView.as_view()),
+    url(r'^baike/detail$', views.BaikeDetailView.as_view()),
+    url(r'^baike/detail/list$', views.BaikeDetailListView.as_view()),
 
 ]
 

+ 191 - 0
src/manage/views.py

@@ -1342,3 +1342,194 @@ class UserConsultDetailView(cv.AdminView):
         except Exception as e:
             cv.tracefail()
             return cv.to_fail(e)
+
+
+class BaikeCategoryListView(cv.AdminView):
+    def get(self, request):
+        """#百科词条分类列表(平台管理后台)
+        @name:"股票名称"
+        @page:1
+        @page_size:20
+        """
+        qdata = request.json
+        try:
+            rst = ctl.get_baike_category_tree(**qdata)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+
+class BaikeDetailView(cv.AdminView):
+    def get(self, request):
+        """#词条详情(平台管理后台)
+        @id:1
+        """
+        qdata = request.json
+        need_params = ["id"]
+        mse = ccf.check_params(*need_params,**qdata)
+        if mse:
+            raise ce.TipException(mse)
+        try:
+            vals = ccf.get_need_params(*need_params,**qdata)
+            rst = ctl.get_detail_info(self,**vals)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+    def post(self,request):
+        """#新增词条(平台管理后台)
+        @user_id:"用户id"
+        @fund:"资金"
+        @match_id:"比赛id"
+        @match_group:"比赛分组"
+        """
+        qdata = request.json
+        need_params = ["name","content","category_id"]
+        mse = ccf.check_params(*need_params,**qdata)
+        if mse:
+            raise ce.TipException(mse)
+        try:
+            vals = ccf.get_need_params(*need_params,**qdata)
+            vals["cid"] = 0
+            vals["cname"] = u"系统管理员"
+            if qdata.get("action") == "publish":
+                vals["status"] = 1
+            rst = ctl.add_model(self,**vals)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+    def put(self,request):
+        """#修改词条(平台管理后台)
+        @id:"1"
+        @fund:"资金"
+        @match_id:"比赛id"
+        @match_group:"比赛分组"
+        """
+        qdata = request.json
+        need_params = ["id","name","content","category_id"]
+        mse = ccf.check_params(*need_params,**qdata)
+        if mse:
+            raise ce.TipException(mse)
+        try:
+            vals = ccf.get_need_params(*need_params,**qdata)
+            if qdata.get("action") == "publish":
+                vals["status"] = 1
+            rst = ctl.update_model(self,**vals)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+    def delete(self,request):
+        """#删除词条(平台管理后台)
+        @id:"1",多个逗号分隔
+        """
+        qdata = request.json
+        need_params = ["id"]
+        mse = ccf.check_params(*need_params,**qdata)
+        if mse:
+            raise ce.TipException(mse)
+        try:
+            vals = ccf.get_need_params(*need_params,**qdata)
+            rst = ctl.delete_model(self,**vals)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+class BaikeDetailListView(cv.AdminView):
+    def get(self, request):
+        """#百科词条列表(平台管理后台)
+        @name:""
+        @page:1
+        @page_size:20
+        """
+        qdata = request.json
+        try:
+            total,rst = ctl.get_list_info(self,**qdata)
+            return cv.to_suc({"total":total,"list":rst})
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+
+class BaikeCategoryView(cv.AdminView):
+    def get(self, request):
+        """#词条分类详情(平台管理后台)
+        @id:1
+        """
+        qdata = request.json
+        need_params = ["id"]
+        mse = ccf.check_params(*need_params,**qdata)
+        if mse:
+            raise ce.TipException(mse)
+        try:
+            vals = ccf.get_need_params(*need_params,**qdata)
+            rst = ctl.get_detail_info(self,**vals)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+    def post(self,request):
+        """#新增词条分类(平台管理后台)
+        @user_id:"用户id"
+        @fund:"资金"
+        @match_id:"比赛id"
+        @match_group:"比赛分组"
+        """
+        qdata = request.json
+        need_params = ["name"]
+        mse = ccf.check_params(*need_params,**qdata)
+        if mse:
+            raise ce.TipException(mse)
+        try:
+            need_params.extend(["parent_id","parent_name"])
+            vals = ccf.get_need_params(*need_params,**qdata)
+            rst = ctl.add_model(self,**vals)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+    def put(self,request):
+        """#修改词条分类(平台管理后台)
+        @id:"1"
+        @fund:"资金"
+        @match_id:"比赛id"
+        @match_group:"比赛分组"
+        """
+        qdata = request.json
+        need_params = ["id","name"]
+        mse = ccf.check_params(*need_params,**qdata)
+        if mse:
+            raise ce.TipException(mse)
+        try:
+            need_params.extend(["parent_id","parent_name"])
+            vals = ccf.get_need_params(*need_params,**qdata)
+            rst = ctl.update_model(self,**vals)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+    def delete(self,request):
+        """#删除词条分类(平台管理后台)
+        @id:"1",多个逗号分隔
+        """
+        qdata = request.json
+        need_params = ["id"]
+        mse = ccf.check_params(*need_params,**qdata)
+        if mse:
+            raise ce.TipException(mse)
+        try:
+            vals = ccf.get_need_params(*need_params,**qdata)
+            rst = ctl.delete_model(self,**vals)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)

+ 608 - 0
src/nohup.out

@@ -18,3 +18,611 @@ Traceback (most recent call last):
 NameError: global name 'match_id' is not defined
 [16/Feb/2023 15:57:47] "GET /api/wx/v3/match/latest HTTP/1.1" 200 66
 [16/Feb/2023 15:57:47] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 19120
+/tmp/wanzb_v3_api/src/utils/aestool.py:2: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
+  from cryptography.hazmat.primitives import padding
+[18/Feb/2023 09:55:19] "GET /api/wx/v3/match/latest HTTP/1.1" 200 36
+[18/Feb/2023 09:55:41] "POST /api/wx/v3/login HTTP/1.1" 200 134
+[18/Feb/2023 09:55:42] "GET /api/wx/authinfo HTTP/1.1" 200 423
+[18/Feb/2023 09:55:42] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 09:55:42] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 09:55:45] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 09:55:45] "GET /api/wx/v3/group/rank?id=73&order_by=0&page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 49797
+[18/Feb/2023 09:55:47] "GET /api/wx/v2/default/date HTTP/1.1" 200 33
+[18/Feb/2023 09:55:48] "GET /api/wx/v2/hot/stock/buy/list?page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 6308
+[18/Feb/2023 09:55:52] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 09:55:52] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 09:55:53] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[18/Feb/2023 10:09:10] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:09:10] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 10:09:33] "GET /api/wx/v2/default/date HTTP/1.1" 200 33
+[18/Feb/2023 10:09:34] "GET /api/wx/v2/hot/follow/list?page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 17130
+[18/Feb/2023 10:09:36] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:09:36] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 10:09:36] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[18/Feb/2023 10:10:06] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:10:06] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 10:10:16] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:10:16] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 10:10:17] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[18/Feb/2023 10:11:34] "GET /api/wx/v2/default/date HTTP/1.1" 200 33
+[18/Feb/2023 10:11:35] "GET /api/wx/v2/hot/stock/buy/list?page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 6301
+[18/Feb/2023 10:12:47] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:12:47] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 10:12:48] "GET /api/wx/v2/default/date HTTP/1.1" 200 33
+[18/Feb/2023 10:12:48] "GET /api/wx/v2/hot/stock/buy/list?page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 6306
+[18/Feb/2023 10:13:14] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:13:14] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 10:13:19] "GET /api/wx/v2/default/date HTTP/1.1" 200 33
+[18/Feb/2023 10:13:19] "GET /api/wx/v2/hot/stock/buy/list?page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 6308
+[18/Feb/2023 10:13:47] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 10:13:47] "GET /api/wx/v3/group/rank?id=73&order_by=0&page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 49797
+[18/Feb/2023 10:13:49] "GET /api/wx/v3/group/rank?id=74&order_by=0&page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 90673
+[18/Feb/2023 10:13:52] "GET /api/wx/v2/match/list HTTP/1.1" 200 41771
+[18/Feb/2023 10:13:52] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 10:13:53] "GET /api/wx/group/rank/list?match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52548
+[18/Feb/2023 10:13:54] "GET /api/wx/player/match?id=14&record_id=11491&user_id=4491 HTTP/1.1" 200 32061
+[18/Feb/2023 10:13:54] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11491 HTTP/1.1" 200 45
+[18/Feb/2023 10:13:57] "GET /api/wx/user/info?user_id=4491 HTTP/1.1" 200 787
+[18/Feb/2023 10:14:07] "GET /api/wx/v3/user/match/list?user_id=4491 HTTP/1.1" 200 45705
+[18/Feb/2023 10:14:09] "POST /api/wx/v2/user/follow HTTP/1.1" 200 26
+[18/Feb/2023 10:14:15] "GET /api/wx/v3/group/rank?id=73&order_by=0&page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 49797
+[18/Feb/2023 10:14:15] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 10:14:23] "GET /api/wx/player/match?id=14&record_id=11491&user_id=4491 HTTP/1.1" 200 32061
+[18/Feb/2023 10:14:23] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11491 HTTP/1.1" 200 45
+[18/Feb/2023 10:14:24] "GET /api/wx/user/info?user_id=4491 HTTP/1.1" 200 787
+[18/Feb/2023 10:14:25] "GET /api/wx/v3/user/match/list?user_id=4491 HTTP/1.1" 200 45705
+[18/Feb/2023 10:15:05] "GET /api/wx/player/match?id=14&record_id=11611&user_id=4055 HTTP/1.1" 200 42543
+[18/Feb/2023 10:15:06] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11611 HTTP/1.1" 200 510
+[18/Feb/2023 10:16:29] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:16:29] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 10:17:05] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:17:06] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 10:17:06] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[18/Feb/2023 10:17:32] "GET /api/wx/v2/default/date HTTP/1.1" 200 33
+[18/Feb/2023 10:17:32] "GET /api/wx/v2/hot/follow/list?page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 17130
+[18/Feb/2023 10:17:38] "GET /api/wx/v2/default/date HTTP/1.1" 200 33
+[18/Feb/2023 10:17:38] "GET /api/wx/v2/hot/stock/buy/list?page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 6300
+[18/Feb/2023 10:17:47] "GET /api/wx/v2/match/list HTTP/1.1" 200 41771
+[18/Feb/2023 10:17:47] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 10:17:48] "GET /api/wx/group/rank/list?match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52548
+[18/Feb/2023 10:17:50] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 10:17:52] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 10:17:52] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 10:17:53] "GET /api/wx/v2/enum/list HTTP/1.1" 200 590
+[18/Feb/2023 10:18:53] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:18:54] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 10:19:04] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 10:19:05] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 831
+[18/Feb/2023 10:24:45] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:24:45] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 10:24:46] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 10:24:48] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 831
+[18/Feb/2023 10:25:01] "POST /api/wx/v3/user/consult HTTP/1.1" 200 23
+[18/Feb/2023 10:25:02] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 1124
+[18/Feb/2023 10:47:37] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:47:37] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 10:47:39] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 10:47:41] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 1124
+[18/Feb/2023 10:54:43] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:54:43] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 10:54:43] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 10:54:45] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 1124
+[18/Feb/2023 10:55:13] "POST /api/wx/v3/user/consult HTTP/1.1" 200 23
+[18/Feb/2023 10:55:13] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 1328
+[18/Feb/2023 10:56:10] "POST /api/wx/v3/user/consult HTTP/1.1" 200 23
+[18/Feb/2023 10:56:35] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 1532
+[18/Feb/2023 10:57:36] "POST /api/wx/v3/user/consult HTTP/1.1" 200 23
+[18/Feb/2023 10:57:37] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 1736
+[18/Feb/2023 10:58:21] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 10:58:21] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 10:58:33] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 10:58:35] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 1736
+[18/Feb/2023 10:58:49] "POST /api/wx/v3/user/consult HTTP/1.1" 200 23
+[18/Feb/2023 10:58:50] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 1945
+[18/Feb/2023 10:59:00] "POST /api/wx/v3/user/consult HTTP/1.1" 200 23
+[18/Feb/2023 10:59:01] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 2238
+[18/Feb/2023 11:04:13] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 11:04:13] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 11:04:14] "GET /api/wx/v2/enum/list HTTP/1.1" 200 590
+[18/Feb/2023 11:08:42] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 11:08:42] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 11:08:44] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 11:08:45] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 11:08:45] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 11:08:46] "GET /api/wx/v2/enum/list HTTP/1.1" 200 590
+[18/Feb/2023 11:15:48] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 11:15:48] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 11:15:50] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 11:15:51] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 11:15:52] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 11:15:52] "GET /api/wx/v2/enum/list HTTP/1.1" 200 590
+[18/Feb/2023 11:17:10] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 11:17:10] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 11:17:11] "GET /api/wx/v2/enum/list HTTP/1.1" 200 590
+[18/Feb/2023 11:20:57] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 11:20:57] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 11:20:58] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 11:20:59] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 11:20:59] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 11:21:00] "GET /api/wx/v2/enum/list HTTP/1.1" 200 590
+[18/Feb/2023 11:29:44] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 11:29:44] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 11:29:57] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 11:29:58] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 11:29:58] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 11:29:59] "GET /api/wx/v2/enum/list HTTP/1.1" 200 590
+[18/Feb/2023 11:46:30] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 11:46:30] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 11:46:31] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 11:46:32] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 11:46:33] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 11:46:33] "GET /api/wx/v2/enum/list HTTP/1.1" 200 590
+Traceback (most recent call last):
+  File "/tmp/wanzb_v3_api/src/weixin/views.py", line 648, in put
+    rst = ctl.update_user_style(**vals)
+  File "/tmp/wanzb_v3_api/src/weixin/controls.py", line 1729, in update_user_style
+    init_fund = kwargs.pop("init_fund")
+KeyError: 'init_fund'
+[18/Feb/2023 11:46:54] "PUT /api/wx/v2/mine/style HTTP/1.1" 200 40
+Traceback (most recent call last):
+  File "/tmp/wanzb_v3_api/src/weixin/views.py", line 648, in put
+    rst = ctl.update_user_style(**vals)
+  File "/tmp/wanzb_v3_api/src/weixin/controls.py", line 1729, in update_user_style
+    init_fund = kwargs.pop("init_fund")
+KeyError: 'init_fund'
+[18/Feb/2023 11:49:55] "PUT /api/wx/v2/mine/style HTTP/1.1" 200 40
+[18/Feb/2023 11:50:17] "GET /api/wx/v2/match/list HTTP/1.1" 200 41771
+[18/Feb/2023 11:50:17] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 11:50:17] "GET /api/wx/group/rank/list?match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52548
+[18/Feb/2023 11:50:19] "GET /api/wx/player/match?id=14&record_id=11864&user_id=4221 HTTP/1.1" 200 35692
+[18/Feb/2023 11:50:19] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11864 HTTP/1.1" 200 45
+[18/Feb/2023 11:50:21] "GET /api/wx/user/info?user_id=4221 HTTP/1.1" 200 1200
+[18/Feb/2023 11:50:21] "GET /api/wx/v3/user/match/list?user_id=4221 HTTP/1.1" 200 46238
+[18/Feb/2023 11:50:46] "GET /api/wx/user/info?user_id=4221 HTTP/1.1" 200 1200
+[18/Feb/2023 11:51:45] "GET /api/wx/v3/user/match/list?user_id=4221 HTTP/1.1" 200 46238
+[18/Feb/2023 11:53:28] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 11:53:28] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 11:53:39] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 11:53:40] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 11:53:40] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 11:53:43] "GET /api/wx/v2/match/list HTTP/1.1" 200 41771
+[18/Feb/2023 11:53:43] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 11:53:44] "GET /api/wx/group/rank/list?match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52548
+[18/Feb/2023 11:53:45] "GET /api/wx/player/match?id=14&record_id=11864&user_id=4221 HTTP/1.1" 200 35692
+[18/Feb/2023 11:53:45] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11864 HTTP/1.1" 200 45
+[18/Feb/2023 11:53:46] "GET /api/wx/user/info?user_id=4221 HTTP/1.1" 200 1200
+[18/Feb/2023 11:53:47] "GET /api/wx/v3/user/match/list?user_id=4221 HTTP/1.1" 200 46238
+[18/Feb/2023 11:54:21] "GET /api/wx/player/match?id=14&record_id=11491&user_id=4491 HTTP/1.1" 200 32061
+[18/Feb/2023 11:54:21] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11491 HTTP/1.1" 200 45
+[18/Feb/2023 11:54:22] "GET /api/wx/user/info?user_id=4491 HTTP/1.1" 200 787
+[18/Feb/2023 11:54:23] "GET /api/wx/v3/user/match/list?user_id=4491 HTTP/1.1" 200 45705
+[18/Feb/2023 11:55:34] "GET /api/wx/player/match?id=14&record_id=11976&user_id=6447 HTTP/1.1" 200 32062
+[18/Feb/2023 11:55:34] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11976 HTTP/1.1" 200 45
+[18/Feb/2023 11:55:35] "GET /api/wx/user/info?user_id=6447 HTTP/1.1" 200 859
+[18/Feb/2023 11:55:35] "GET /api/wx/v3/user/match/list?user_id=6447 HTTP/1.1" 200 17951
+[18/Feb/2023 11:55:40] "GET /api/wx/player/match?id=14&record_id=11864&user_id=4221 HTTP/1.1" 200 35692
+[18/Feb/2023 11:55:41] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11864 HTTP/1.1" 200 45
+[18/Feb/2023 11:55:42] "GET /api/wx/user/info?user_id=4221 HTTP/1.1" 200 1200
+[18/Feb/2023 11:55:43] "GET /api/wx/v3/user/match/list?user_id=4221 HTTP/1.1" 200 46238
+[18/Feb/2023 11:55:55] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 11:55:56] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 11:55:57] "GET /api/wx/v2/enum/list HTTP/1.1" 200 590
+[18/Feb/2023 11:56:09] "GET /api/wx/player/match?id=14&record_id=11864&user_id=4221 HTTP/1.1" 200 35692
+[18/Feb/2023 11:56:09] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11864 HTTP/1.1" 200 45
+[18/Feb/2023 11:56:10] "GET /api/wx/user/info?user_id=4221 HTTP/1.1" 200 1200
+[18/Feb/2023 11:56:11] "GET /api/wx/v3/user/match/list?user_id=4221 HTTP/1.1" 200 46238
+[18/Feb/2023 12:04:57] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 12:04:57] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 3219
+[18/Feb/2023 12:04:59] "GET /api/wx/v2/match/list HTTP/1.1" 200 41771
+[18/Feb/2023 12:04:59] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 12:05:00] "GET /api/wx/group/rank/list?match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52548
+[18/Feb/2023 12:05:01] "GET /api/wx/player/match?id=14&record_id=11864&user_id=4221 HTTP/1.1" 200 35692
+[18/Feb/2023 12:05:01] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11864 HTTP/1.1" 200 45
+[18/Feb/2023 12:05:03] "GET /api/wx/user/info?user_id=4221 HTTP/1.1" 200 1200
+[18/Feb/2023 12:05:03] "GET /api/wx/v3/user/match/list?user_id=4221 HTTP/1.1" 200 46238
+[18/Feb/2023 12:05:11] "GET /api/wx/player/match?id=14&record_id=11491&user_id=4491 HTTP/1.1" 200 32061
+[18/Feb/2023 12:05:12] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11491 HTTP/1.1" 200 45
+[18/Feb/2023 12:05:13] "GET /api/wx/user/info?user_id=4491 HTTP/1.1" 200 787
+[18/Feb/2023 12:05:14] "GET /api/wx/v3/user/match/list?user_id=4491 HTTP/1.1" 200 45705
+[18/Feb/2023 12:05:20] "GET /api/wx/player/match?id=14&record_id=11976&user_id=6447 HTTP/1.1" 200 32062
+[18/Feb/2023 12:05:21] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11976 HTTP/1.1" 200 45
+[18/Feb/2023 12:05:22] "GET /api/wx/user/info?user_id=6447 HTTP/1.1" 200 859
+[18/Feb/2023 12:05:22] "GET /api/wx/v3/user/match/list?user_id=6447 HTTP/1.1" 200 17951
+[18/Feb/2023 12:05:26] "GET /api/wx/player/match?id=14&record_id=12292&user_id=1720 HTTP/1.1" 200 22913
+[18/Feb/2023 12:05:27] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=12292 HTTP/1.1" 200 45
+[18/Feb/2023 12:05:28] "GET /api/wx/user/info?user_id=1720 HTTP/1.1" 200 1116
+[18/Feb/2023 12:05:28] "GET /api/wx/v3/user/match/list?user_id=1720 HTTP/1.1" 200 51487
+[18/Feb/2023 12:05:32] "GET /api/wx/player/match?id=14&record_id=11590&user_id=657 HTTP/1.1" 200 28886
+[18/Feb/2023 12:05:32] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11590 HTTP/1.1" 200 45
+[18/Feb/2023 12:05:33] "GET /api/wx/user/info?user_id=657 HTTP/1.1" 200 644
+[18/Feb/2023 12:05:34] "GET /api/wx/v3/user/match/list?user_id=657 HTTP/1.1" 200 33459
+[18/Feb/2023 12:05:45] "POST /api/wx/v2/user/follow HTTP/1.1" 200 26
+[18/Feb/2023 12:05:52] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 12:05:54] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 12:05:54] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 12:06:09] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 2238
+[18/Feb/2023 12:06:25] "GET /api/wx/group/rank?id=74&order_by=0&page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 90461
+[18/Feb/2023 12:06:33] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 12:06:33] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 12:06:39] "GET /api/wx/player/match?id=14&record_id=11491&user_id=4491 HTTP/1.1" 200 32061
+[18/Feb/2023 12:06:40] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11491 HTTP/1.1" 200 45
+[18/Feb/2023 12:06:42] "GET /api/wx/user/info?user_id=4491 HTTP/1.1" 200 787
+[18/Feb/2023 12:06:43] "GET /api/wx/v3/user/match/list?user_id=4491 HTTP/1.1" 200 45705
+[18/Feb/2023 12:06:46] "GET /api/wx/player/match?id=14&record_id=11864&user_id=4221 HTTP/1.1" 200 35692
+[18/Feb/2023 12:06:47] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11864 HTTP/1.1" 200 45
+[18/Feb/2023 12:06:49] "GET /api/wx/user/info?user_id=4221 HTTP/1.1" 200 1200
+[18/Feb/2023 12:06:49] "GET /api/wx/v3/user/match/list?user_id=4221 HTTP/1.1" 200 46238
+[18/Feb/2023 14:32:30] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 14:32:31] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:33:24] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 14:33:24] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:33:33] "GET /api/wx/player/match?id=14&record_id=11590&user_id=657 HTTP/1.1" 200 28886
+[18/Feb/2023 14:33:34] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11590 HTTP/1.1" 200 45
+[18/Feb/2023 14:33:35] "GET /api/wx/user/info?user_id=657 HTTP/1.1" 200 644
+[18/Feb/2023 14:33:36] "GET /api/wx/v3/user/match/list?user_id=657 HTTP/1.1" 200 33459
+[18/Feb/2023 14:33:43] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:33:49] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:34:30] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:35:51] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:36:03] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:37:04] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 14:37:04] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:37:07] "GET /api/wx/player/match?id=14&record_id=11590&user_id=657 HTTP/1.1" 200 28886
+[18/Feb/2023 14:37:08] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11590 HTTP/1.1" 200 45
+[18/Feb/2023 14:37:09] "GET /api/wx/user/info?user_id=657 HTTP/1.1" 200 644
+[18/Feb/2023 14:37:09] "GET /api/wx/v3/user/match/list?user_id=657 HTTP/1.1" 200 33459
+[18/Feb/2023 14:37:15] "GET /api/wx/v3/user/follower/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 14:37:19] "GET /api/wx/v3/user/follower/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 14:38:05] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 14:38:06] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:38:08] "GET /api/wx/player/match?id=14&record_id=11590&user_id=657 HTTP/1.1" 200 28886
+[18/Feb/2023 14:38:08] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11590 HTTP/1.1" 200 45
+[18/Feb/2023 14:38:10] "GET /api/wx/user/info?user_id=657 HTTP/1.1" 200 644
+[18/Feb/2023 14:38:11] "GET /api/wx/v3/user/match/list?user_id=657 HTTP/1.1" 200 33459
+[18/Feb/2023 14:38:11] "GET /api/wx/v3/user/follower/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 14:38:14] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:42:20] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 14:42:21] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:42:22] "GET /api/wx/player/match?id=14&record_id=11590&user_id=657 HTTP/1.1" 200 28886
+[18/Feb/2023 14:42:22] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11590 HTTP/1.1" 200 45
+[18/Feb/2023 14:42:24] "GET /api/wx/user/info?user_id=657 HTTP/1.1" 200 644
+[18/Feb/2023 14:42:24] "GET /api/wx/v3/user/match/list?user_id=657 HTTP/1.1" 200 33459
+[18/Feb/2023 14:42:25] "GET /api/wx/v3/user/follower/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 14:42:34] "GET /api/wx/v3/user/follower/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 14:42:42] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:44:00] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 14:44:00] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:44:02] "GET /api/wx/player/match?id=14&record_id=11590&user_id=657 HTTP/1.1" 200 28886
+[18/Feb/2023 14:44:02] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11590 HTTP/1.1" 200 45
+[18/Feb/2023 14:44:03] "GET /api/wx/user/info?user_id=657 HTTP/1.1" 200 644
+[18/Feb/2023 14:44:04] "GET /api/wx/v3/user/match/list?user_id=657 HTTP/1.1" 200 33459
+[18/Feb/2023 14:44:05] "GET /api/wx/v3/user/follower/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 14:44:08] "GET /api/wx/v2/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 1284
+[18/Feb/2023 14:45:16] "GET /api/wx/v3/user/follower/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 14:45:49] "GET /api/wx/v2/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 1284
+[18/Feb/2023 14:46:28] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 14:46:28] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:46:30] "GET /api/wx/player/match?id=14&record_id=11491&user_id=4491 HTTP/1.1" 200 32061
+[18/Feb/2023 14:46:30] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11491 HTTP/1.1" 200 45
+[18/Feb/2023 14:46:31] "GET /api/wx/user/info?user_id=4491 HTTP/1.1" 200 787
+[18/Feb/2023 14:46:32] "GET /api/wx/v3/user/match/list?user_id=4491 HTTP/1.1" 200 45705
+[18/Feb/2023 14:46:33] "GET /api/wx/v3/user/follower/list?page=1&page_size=50 HTTP/1.1" 200 45
+[18/Feb/2023 14:46:40] "GET /api/wx/v2/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 1284
+[18/Feb/2023 14:47:04] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 14:47:04] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:47:06] "GET /api/wx/player/match?id=14&record_id=11491&user_id=4491 HTTP/1.1" 200 32061
+[18/Feb/2023 14:47:06] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11491 HTTP/1.1" 200 45
+[18/Feb/2023 14:47:07] "GET /api/wx/user/info?user_id=4491 HTTP/1.1" 200 787
+[18/Feb/2023 14:47:08] "GET /api/wx/v3/user/match/list?user_id=4491 HTTP/1.1" 200 45705
+[18/Feb/2023 14:47:09] "GET /api/wx/v3/user/follower/list?page=1&page_size=50&user_id=4491 HTTP/1.1" 200 37810
+[18/Feb/2023 14:47:16] "GET /api/wx/v2/user/follow/list?page=1&page_size=50&user_id=4491 HTTP/1.1" 200 45
+[18/Feb/2023 14:47:22] "GET /api/wx/player/match?id=14&record_id=11590&user_id=657 HTTP/1.1" 200 28886
+[18/Feb/2023 14:47:22] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11590 HTTP/1.1" 200 45
+[18/Feb/2023 14:47:23] "GET /api/wx/user/info?user_id=657 HTTP/1.1" 200 644
+[18/Feb/2023 14:47:24] "GET /api/wx/v3/user/match/list?user_id=657 HTTP/1.1" 200 33459
+[18/Feb/2023 14:47:25] "GET /api/wx/v3/user/follower/list?page=1&page_size=50&user_id=657 HTTP/1.1" 200 36784
+[18/Feb/2023 14:47:27] "GET /api/wx/v2/user/follow/list?page=1&page_size=50&user_id=657 HTTP/1.1" 200 45
+[18/Feb/2023 14:47:32] "GET /api/wx/v2/match/list HTTP/1.1" 200 41771
+[18/Feb/2023 14:47:32] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 14:47:33] "GET /api/wx/group/rank/list?match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52548
+[18/Feb/2023 14:47:35] "GET /api/wx/player/match?id=14&record_id=11976&user_id=6447 HTTP/1.1" 200 32062
+[18/Feb/2023 14:47:35] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11976 HTTP/1.1" 200 45
+[18/Feb/2023 14:47:36] "GET /api/wx/user/info?user_id=6447 HTTP/1.1" 200 859
+[18/Feb/2023 14:47:36] "GET /api/wx/v3/user/match/list?user_id=6447 HTTP/1.1" 200 17951
+[18/Feb/2023 14:47:40] "GET /api/wx/player/match?id=14&record_id=11864&user_id=4221 HTTP/1.1" 200 35692
+[18/Feb/2023 14:47:40] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11864 HTTP/1.1" 200 45
+[18/Feb/2023 14:47:41] "GET /api/wx/user/info?user_id=4221 HTTP/1.1" 200 1200
+[18/Feb/2023 14:47:42] "GET /api/wx/v3/user/match/list?user_id=4221 HTTP/1.1" 200 46238
+[18/Feb/2023 14:47:43] "GET /api/wx/v2/user/follow/list?page=1&page_size=50&user_id=4221 HTTP/1.1" 200 6378
+[18/Feb/2023 14:47:49] "GET /api/wx/v3/user/follower/list?page=1&page_size=50&user_id=4221 HTTP/1.1" 200 32336
+[18/Feb/2023 14:48:07] "GET /api/wx/v3/user/follower/list?page=2&page_size=50&user_id=4221 HTTP/1.1" 200 15095
+[18/Feb/2023 14:49:29] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 14:49:29] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 14:49:31] "GET /api/wx/v2/match/list HTTP/1.1" 200 41771
+[18/Feb/2023 14:49:31] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 14:49:31] "GET /api/wx/group/rank/list?match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52548
+[18/Feb/2023 14:49:33] "GET /api/wx/player/match?id=14&record_id=11864&user_id=4221 HTTP/1.1" 200 35692
+[18/Feb/2023 14:49:34] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11864 HTTP/1.1" 200 45
+[18/Feb/2023 14:49:35] "GET /api/wx/user/info?user_id=4221 HTTP/1.1" 200 1200
+[18/Feb/2023 14:49:35] "GET /api/wx/v3/user/match/list?user_id=4221 HTTP/1.1" 200 46238
+[18/Feb/2023 14:49:37] "GET /api/wx/v3/user/follower/list?page=1&page_size=50&user_id=4221 HTTP/1.1" 200 32336
+[18/Feb/2023 14:49:39] "GET /api/wx/user/info?user_id=828 HTTP/1.1" 200 1083
+[18/Feb/2023 14:49:39] "GET /api/wx/v3/user/match/list?user_id=828 HTTP/1.1" 200 19736
+[18/Feb/2023 14:49:42] "GET /api/wx/player/match?id=14&user_id=828 HTTP/1.1" 200 22238
+[18/Feb/2023 14:50:05] "GET /api/wx/v2/user/follow/list?page=1&page_size=50&user_id=4221 HTTP/1.1" 200 6378
+[18/Feb/2023 14:50:07] "GET /api/wx/user/info?user_id=1062 HTTP/1.1" 200 1218
+[18/Feb/2023 14:50:07] "GET /api/wx/v3/user/match/list?user_id=1062 HTTP/1.1" 200 48735
+[18/Feb/2023 14:50:11] "GET /api/wx/player/match?id=13&user_id=1062 HTTP/1.1" 200 45734
+[18/Feb/2023 14:50:27] "GET /api/wx/player/match?id=12&user_id=1062 HTTP/1.1" 200 72946
+[18/Feb/2023 14:50:41] "GET /api/wx/player/match?id=14&user_id=1062 HTTP/1.1" 200 13362
+[18/Feb/2023 14:50:45] "GET /api/wx/player/match?id=13&user_id=1062 HTTP/1.1" 200 45734
+[18/Feb/2023 14:51:15] "GET /api/wx/player/match?id=14&user_id=1062 HTTP/1.1" 200 13362
+[18/Feb/2023 14:52:29] "GET /api/wx/player/match?id=13&user_id=1062 HTTP/1.1" 200 45734
+[18/Feb/2023 14:57:53] "GET /api/wx/v2/mine/latest HTTP/1.1" 200 23
+[18/Feb/2023 14:57:55] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 2238
+[18/Feb/2023 14:58:30] "GET /api/wx/user/info?user_id=6531 HTTP/1.1" 200 455
+[18/Feb/2023 14:58:30] "GET /api/wx/v3/user/match/list?user_id=6531 HTTP/1.1" 200 45
+[18/Feb/2023 14:58:35] "GET /api/wx/v3/user/consult/list HTTP/1.1" 200 2238
+[18/Feb/2023 14:59:02] "GET /api/wx/player/match?id=14&record_id=12292&user_id=1720 HTTP/1.1" 200 22913
+[18/Feb/2023 14:59:03] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=12292 HTTP/1.1" 200 45
+[18/Feb/2023 14:59:04] "GET /api/wx/user/info?user_id=1720 HTTP/1.1" 200 1116
+[18/Feb/2023 14:59:05] "GET /api/wx/v3/user/match/list?user_id=1720 HTTP/1.1" 200 51487
+[18/Feb/2023 14:59:07] "GET /api/wx/player/match?id=14&user_id=1720 HTTP/1.1" 200 22914
+[18/Feb/2023 14:59:16] "GET /api/wx/player/match?id=14&record_id=11590&user_id=657 HTTP/1.1" 200 28886
+[18/Feb/2023 14:59:16] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11590 HTTP/1.1" 200 45
+[18/Feb/2023 14:59:17] "GET /api/wx/user/info?user_id=657 HTTP/1.1" 200 644
+[18/Feb/2023 14:59:18] "GET /api/wx/v3/user/match/list?user_id=657 HTTP/1.1" 200 33459
+[18/Feb/2023 14:59:19] "GET /api/wx/player/match?id=14&user_id=657 HTTP/1.1" 200 28888
+[18/Feb/2023 15:01:10] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[18/Feb/2023 15:01:10] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[18/Feb/2023 15:01:13] "GET /api/wx/player/match?id=14&record_id=11491&user_id=4491 HTTP/1.1" 200 32061
+[18/Feb/2023 15:01:13] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=11491 HTTP/1.1" 200 45
+[18/Feb/2023 15:01:15] "GET /api/wx/user/info?user_id=4491 HTTP/1.1" 200 787
+[18/Feb/2023 15:01:15] "GET /api/wx/v3/user/match/list?user_id=4491 HTTP/1.1" 200 45705
+[18/Feb/2023 15:01:17] "GET /api/wx/player/match?id=14&user_id=4491 HTTP/1.1" 200 32062
+[18/Feb/2023 15:01:25] "GET /api/wx/player/match?id=14&record_id=9740&user_id=4491 HTTP/1.1" 200 32525
+[18/Feb/2023 15:01:25] "GET /api/wx/v3/user/comments/list?page=1&page_size=50&record_id=9740 HTTP/1.1" 200 7590
+[18/Feb/2023 15:01:40] "GET /api/wx/v2/match/list HTTP/1.1" 200 41771
+[18/Feb/2023 15:01:40] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[18/Feb/2023 15:01:41] "GET /api/wx/group/rank/list?match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52548
+[18/Feb/2023 15:01:48] "GET /api/wx/v2/default/date HTTP/1.1" 200 33
+[18/Feb/2023 15:01:49] "GET /api/wx/v2/hot/follow/list?page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 17130
+[18/Feb/2023 15:36:37] code 400, message Bad request syntax ('\x03\x00\x00\x13\x0e\xe0\x00\x00\x00\x00\x00\x01\x00\x08\x00\x02\x00\x00\x00')
+Traceback (most recent call last):
+  File "/usr/lib/python2.7/logging/__init__.py", line 868, in emit
+    msg = self.format(record)
+  File "/usr/lib/python2.7/logging/__init__.py", line 741, in format
+    return fmt.format(record)
+  File "/usr/local/lib/python2.7/dist-packages/django/utils/log.py", line 192, in format
+    return super(ServerFormatter, self).format(record)
+  File "/usr/lib/python2.7/logging/__init__.py", line 476, in format
+    raise e
+UnicodeDecodeError: 'utf8' codec can't decode byte 0xe0 in position 6: invalid continuation byte
+Logged from file basehttp.py, line 124
+Traceback (most recent call last):
+  File "/usr/lib/python2.7/SocketServer.py", line 599, in process_request_thread
+    self.finish_request(request, client_address)
+  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
+    self.RequestHandlerClass(request, client_address, self)
+  File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
+    self.handle()
+  File "/usr/local/lib/python2.7/dist-packages/django/core/servers/basehttp.py", line 140, in handle
+    self.raw_requestline = self.rfile.readline(65537)
+  File "/usr/lib/python2.7/socket.py", line 480, in readline
+    data = self._sock.recv(self._rbufsize)
+error: [Errno 104] Connection reset by peer
+[18/Feb/2023 15:52:21] code 400, message Bad request version ('\xc0\x14\xc0')
+[18/Feb/2023 15:52:21] You're accessing the development server over HTTPS, but it only supports HTTP.
+
+2023-02-18 15:52:22,796 [django.request:152] [base:get_response] [WARNING]- Not Found: /
+[18/Feb/2023 15:52:22] "GET / HTTP/1.1" 404 74
+2023-02-18 15:52:23,232 [django.request:152] [base:get_response] [WARNING]- Not Found: /
+[18/Feb/2023 15:52:23] "GET / HTTP/1.1" 404 74
+[18/Feb/2023 15:52:23] code 505, message Invalid HTTP Version (2.0)
+[18/Feb/2023 15:52:23] "PRI * HTTP/2.0" 505 -
+[19/Feb/2023 11:41:02] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 11:41:02] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 21278
+[19/Feb/2023 11:45:55] "GET /api/wx/v2/default/date?&match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 11:45:55] "GET /api/wx/v3/group/rank?id=73&order_by=0&page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 49797
+[19/Feb/2023 11:45:56] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 21278
+[19/Feb/2023 11:45:57] "GET /api/wx/v2/match/list? HTTP/1.1" 200 41771
+[19/Feb/2023 11:45:57] "GET /api/wx/v2/default/date?&match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 11:45:57] "GET /api/wx/group/rank/list?&match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52533
+[19/Feb/2023 16:13:58] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 16:13:59] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 16:15:26] "GET /api/wx/v2/default/date HTTP/1.1" 200 33
+[19/Feb/2023 16:15:26] "GET /api/wx/v2/hot/stock/buy/list?page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 6306
+[19/Feb/2023 16:15:30] "GET /api/wx/v2/default/date HTTP/1.1" 200 33
+[19/Feb/2023 16:15:31] "GET /api/wx/v2/hot/follow/list?page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 17130
+[19/Feb/2023 16:15:33] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 16:15:33] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 16:15:33] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[19/Feb/2023 16:22:55] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 16:22:55] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 16:23:05] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 16:23:05] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 16:23:06] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[19/Feb/2023 17:05:02] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:05:02] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:05:05] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:05:05] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:05:05] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[19/Feb/2023 17:07:04] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:07:04] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:07:06] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:07:06] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:07:06] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[19/Feb/2023 17:08:46] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:08:46] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:08:47] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:08:47] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:08:48] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[19/Feb/2023 17:09:18] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:09:18] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:09:19] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:09:19] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:09:19] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[19/Feb/2023 17:09:42] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:09:42] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:09:43] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:09:43] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:09:44] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[19/Feb/2023 17:10:07] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:10:07] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:10:08] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:10:08] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:10:09] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[19/Feb/2023 17:10:28] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:10:28] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:10:29] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:10:29] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:10:29] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[19/Feb/2023 17:14:41] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:14:42] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:14:43] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:14:43] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:14:44] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:15:20] "GET /api/wx/v3/profit/rank/list?match_id=14&page=2&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 78327
+[19/Feb/2023 17:24:58] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:24:58] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:28:21] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:28:21] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:28:22] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:28:22] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:28:23] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:30:08] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:30:08] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:30:09] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:30:09] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:30:10] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:30:18] "GET /api/wx/v3/profit/rank/list?match_id=14&page=2&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 78327
+[19/Feb/2023 17:30:36] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:30:37] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:30:37] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:30:43] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:30:43] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:30:44] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:30:56] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:30:57] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:30:57] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:31:20] "GET /api/wx/v3/profit/rank/list?match_id=14&page=2&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 78327
+[19/Feb/2023 17:32:55] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:32:55] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:32:57] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:32:57] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:32:57] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:33:17] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:33:17] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:33:18] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:33:26] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:33:26] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:33:27] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:33:34] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:33:34] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:33:34] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:34:08] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:34:08] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:34:09] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:34:09] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:34:10] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:36:50] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:36:51] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:36:57] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:36:57] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:36:57] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[19/Feb/2023 17:38:28] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:38:28] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:38:30] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:38:30] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:38:30] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[19/Feb/2023 17:39:28] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:39:28] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:39:29] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:39:29] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:39:30] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 85942
+[19/Feb/2023 17:39:55] "GET /api/wx/v3/profit/rank/list?match_id=14&page=2&page_size=50&stock_date=2023-02-17&type=loss HTTP/1.1" 200 79517
+[19/Feb/2023 17:40:52] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:40:52] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:40:53] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:40:53] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:40:53] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:41:09] "GET /api/wx/v3/profit/rank/list?match_id=14&page=2&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 78327
+[19/Feb/2023 17:45:11] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:45:12] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:45:16] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:45:16] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:45:16] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:45:23] "GET /api/wx/user/info?user_id=11590 HTTP/1.1" 200 623
+[19/Feb/2023 17:45:23] "GET /api/wx/v3/user/match/list?user_id=11590 HTTP/1.1" 200 45
+[19/Feb/2023 17:45:27] "GET /api/wx/user/info?user_id=11640 HTTP/1.1" 200 596
+[19/Feb/2023 17:45:27] "GET /api/wx/v3/user/match/list?user_id=11640 HTTP/1.1" 200 45
+[19/Feb/2023 17:45:31] "GET /api/wx/user/info?user_id=11861 HTTP/1.1" 200 603
+[19/Feb/2023 17:45:31] "GET /api/wx/v3/user/match/list?user_id=11861 HTTP/1.1" 200 45
+[19/Feb/2023 17:48:28] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:48:28] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:48:29] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:48:29] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:48:29] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:48:31] "GET /api/wx/user/info?user_id=657 HTTP/1.1" 200 644
+[19/Feb/2023 17:48:31] "GET /api/wx/v3/user/match/list?user_id=657 HTTP/1.1" 200 33459
+[19/Feb/2023 17:48:34] "GET /api/wx/user/info?user_id=490 HTTP/1.1" 200 760
+[19/Feb/2023 17:48:35] "GET /api/wx/v3/user/match/list?user_id=490 HTTP/1.1" 200 19366
+[19/Feb/2023 17:48:38] "GET /api/wx/player/match?id=14&user_id=490 HTTP/1.1" 200 26886
+[19/Feb/2023 17:48:47] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:48:47] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:48:48] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:49:17] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:49:17] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:49:18] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:49:18] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:49:19] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:50:09] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:50:09] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:50:10] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:50:10] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 17:50:11] "GET /api/wx/v3/profit/rank/list?match_id=14&page=1&page_size=50&stock_date=2023-02-17&type=win HTTP/1.1" 200 83345
+[19/Feb/2023 17:54:56] code 400, message Bad HTTP/0.9 request type ('\x03\x00\x00/*\xe0\x00\x00\x00\x00\x00Cookie:')
+Traceback (most recent call last):
+  File "/usr/lib/python2.7/logging/__init__.py", line 868, in emit
+    msg = self.format(record)
+  File "/usr/lib/python2.7/logging/__init__.py", line 741, in format
+    return fmt.format(record)
+  File "/usr/local/lib/python2.7/dist-packages/django/utils/log.py", line 192, in format
+    return super(ServerFormatter, self).format(record)
+  File "/usr/lib/python2.7/logging/__init__.py", line 476, in format
+    raise e
+UnicodeDecodeError: 'utf8' codec can't decode byte 0xe0 in position 6: invalid continuation byte
+Logged from file basehttp.py, line 124
+[19/Feb/2023 17:57:03] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:57:03] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:57:22] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:57:22] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 17:58:08] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 17:59:59] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 18:00:00] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 18:00:20] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 18:00:20] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 18:00:35] "GET /api/wx/v2/match/list HTTP/1.1" 200 41771
+[19/Feb/2023 18:00:35] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 18:00:35] "GET /api/wx/group/rank/list?match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52533
+[19/Feb/2023 18:01:34] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 18:01:34] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 18:02:04] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 18:02:05] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 18:02:20] "GET /api/wx/v2/match/list HTTP/1.1" 200 41771
+[19/Feb/2023 18:02:20] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 18:02:21] "GET /api/wx/group/rank/list?match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52533
+[19/Feb/2023 18:02:52] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 18:02:52] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 18:02:54] "GET /api/wx/v2/match/list HTTP/1.1" 200 41771
+[19/Feb/2023 18:02:54] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 18:02:55] "GET /api/wx/group/rank/list?match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52533
+[19/Feb/2023 18:03:41] "GET /api/wx/v3/match/latest HTTP/1.1" 200 7028
+[19/Feb/2023 18:03:42] "GET /api/wx/v3/user/follow/list?page=1&page_size=50 HTTP/1.1" 200 6356
+[19/Feb/2023 18:03:47] "GET /api/wx/v2/match/list HTTP/1.1" 200 41771
+[19/Feb/2023 18:03:47] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 18:03:47] "GET /api/wx/group/rank/list?match_id=14&stock_date=2023-02-17 HTTP/1.1" 200 52533
+[19/Feb/2023 18:04:01] "GET /api/wx/v2/default/date?match_id=14 HTTP/1.1" 200 33
+[19/Feb/2023 18:04:02] "GET /api/wx/v3/group/rank?id=73&order_by=0&page=1&page_size=50&stock_date=2023-02-17 HTTP/1.1" 200 49797
+/tmp/wanzb_v3_api/src/utils/aestool.py:2: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
+  from cryptography.hazmat.primitives import padding

+ 29 - 25
src/utils/aliyunpush.py

@@ -5,32 +5,36 @@ from aliyunsdkcore.acs_exception.exceptions import ClientException
 from aliyunsdkcore.acs_exception.exceptions import ServerException
 from aliyunsdkpush.request.v20160801.PushRequest import PushRequest
 
-client = AcsClient('LTAI5t8bioQxGXB1jtVugJcU', 'OdGWSBRjkJxaPjgmE38eQ8nzkI6nRk', 'cn-shenzhen')
+class AliyunPush(object):
+    def __init__(self):
+        self.ACCESSKEYID = "LTAI5t8bioQxGXB1jtVugJcU"
+        self.ACCESSKEYSECRET = "OdGWSBRjkJxaPjgmE38eQ8nzkI6nRk"
+        self.REGIONID = "cn-shenzhen"
+        self.client = AcsClient(self.ACCESSKEYID,self.ACCESSKEYSECRET,self.REGIONID)
+        self.request = PushRequest()
+        self.request.set_accept_format("json")
+        self.request.set_iOSApnsEnv('DEV')
+        self.request.set_AppKey("333793060")
+
+    def push_notice_by_userid(self,user_id,title,body,params):
+        self.request.set_PushType("NOTICE")
+        self.request.set_DeviceType("ALL")
+        self.request.set_Target("ACCOUNT")
+        self.request.set_TargetValue(str(user_id))
+        self.request.set_Body(title)
+        self.request.set_Title(body)
+        self.request.set_iOSExtParameters(params)
+        response = self.client.do_action_with_exception(self.request)
+        return response
+
+aliyunpush = AliyunPush()
 
-request = PushRequest()
-request.set_accept_format('json')
-
-print(dir(request))
-request.set_iOSApnsEnv('DEV')
-request.set_AppKey("333793060")
-request.set_PushType("NOTICE")
-request.set_DeviceType("ALL")
-#request.set_Target("DEVICE")
-#request.set_Target("ALL")
-request.set_Target("ACCOUNT")
-
-request.set_TargetValue("6209")
-
-request.set_Body("测试推送")
-request.set_Title("测试通过account推送")
-
-response = client.do_action_with_exception(request)
-print(response)
-
-# python2:  print(response)
-#print(str(response, encoding='utf-8'))
 
 if __name__ == "__main__":
-    pass
-    #send_notification_by_registration_ids()
+    user_id = 6209
+    title = "测试"
+    body = "测试"
+    params = {"type":"message","id":user_id}
+    res = aliyunpush.push_notice_by_userid(user_id,title,body,params)
+    print(params,res)
 

+ 97 - 9
src/weixin/controls.py

@@ -219,6 +219,7 @@ def get_player_match_detail(request):
         item["yesterday_stock_img"] = json.loads(item["yesterday_stock_img"]) if item["yesterday_stock_img"] else []
         item["today_income"] = "{}%".format(item["today_income"]*100)
         item["total_income"] = "{}%".format(item["total_income"]*100)
+        item["avatar"] = get_user_info(item["user_id"])["avatar"]
 
     today_record = {}
     if records_set:
@@ -1293,19 +1294,20 @@ def get_hot_stock_buy(**kwargs):
     qset = cm.UserStock.objects.filter(stock_date=stock_date)
     if kwargs.get("name"):
         qset = cm.UserStock.objects.filter(stock_name__icontains=kwargs.get("name"))
-    qset = qset.values("stock_id","stock_name").annotate(count=Count("stock_id")).order_by("-count")
+    qset = qset.values("stock_id","stock_name").annotate(count=Count("stock_id"),total_fund=Sum("fund")).order_by("-count")
     data = []
     for q in qset:
         stock_id = q["stock_id"]
         count = q["count"]
         stock_name = q.get("stock_name")
+        total_fund = q["total_fund"]
 
         comments_count = ccc.cache.get("%s_comments" % stock_id)
         choice_count = ccc.cache.get("%s_choices" % stock_id)
         comments_count = comments_count if comments_count else 0
         choice_count = choice_count if choice_count else 0
 
-        data.append({"stock_name":stock_name,"id":stock_id,"count":count,"comments_count":comments_count,"choice_count":choice_count})
+        data.append({"stock_name":stock_name,"id":stock_id,"count":count,"comments_count":comments_count,"choice_count":choice_count,"total_fund":total_fund})
 
 
     page = int(kwargs.get("page",1))
@@ -1725,7 +1727,7 @@ def update_user_style(**kwargs):
     """
     user_id = kwargs.pop("user_id")
     #player_id = kwargs.pop("player_id")
-    init_fund = kwargs.pop("init_fund")
+    #init_fund = kwargs.pop("init_fund")
     #avatar = kwargs.pop("avatar")
 
     cm.UserInfo.objects.filter(id=user_id).update(**kwargs)
@@ -2237,15 +2239,21 @@ def add_wanzhu_consult(request):
     openid = request.user.get("openid")
     qdata = request.json
     content = qdata.get("cotent")
+    width = qdata.get("width")
+    height = qdata.get("height")
     pid = qdata.get("pid")
 
-    obj = cm.WanzhuConsult.objects.create(
+    wanzhu_obj = cm.WanzhuConsult.objects.create(
         user_id = user_id, 
         user_name = user_name, 
         user_avatar = user_avatar, 
         content = content,
         pid = pid
     )
+    wanzhu_obj.width = width
+    wanzhu_obj.height = height
+    wanzhu_obj.save()
+
     obj,flag = cm.Consult.objects.get_or_create(
         user_id = user_id, 
     )
@@ -2254,6 +2262,8 @@ def add_wanzhu_consult(request):
     obj.content = content
     obj.view_status = 0
     obj.reply_status = 0
+    obj.width = width
+    obj.height = height
     obj.ctime = datetime.datetime.now()
     obj.save()
     #自动回复
@@ -2670,19 +2680,33 @@ def get_profit_list(**kwargs):
         stock_date = get_today_date()
 
     qset = cm.PlayerRecord.get_db_model(match_id).objects.filter(stock_date=stock_date)
+
+    #if _type == "win":
+    #    qset = qset.filter(today_income__gte=0).order_by("-today_income")
+    #if _type == "loss":
+    #    qset = qset.filter(today_income__lt=0).order_by("today_income")
+
+    data = list(qset.values())
+    for item in data:
+        item["win_loss"] = item["today_fund"] - item["yesterday_fund"]
+        item["total_win_loss"] = item["today_fund"] - item["init_fund"]
     if _type == "win":
-        qset = qset.filter(today_income__gte=0).order_by("-today_income")
+        data = sorted(data,key=lambda x:x["win_loss"],reverse=True)
     if _type == "loss":
-        qset = qset.filter(today_income__lt=0).order_by("today_income")
+        data = sorted(data,key=lambda x:x["win_loss"])
+    if _type == "total_win":
+        data = sorted(data,key=lambda x:x["total_win_loss"],reverse=True)
+    if _type == "total_loss":
+        data = sorted(data,key=lambda x:x["total_win_loss"])
 
     page = int(kwargs.get("page",0))
     page_size = int(kwargs.get("page_size",20))
 
     if page and page_size:
-        total,qset = ccc.get_page_qset(qset,page,page_size)
+        total,data = ccf.get_page_list(data,page,page_size)
     else:
-        total = qset.count()
-    data = list(qset.values())
+        total = len(data)
+    #data = list(qset.values())
 
     return total,data
 
@@ -2751,3 +2775,67 @@ def get_group_rank_list_v3(request):
 def get_article_type_list(**kwargs):
     rst = [u"每日点评",u"冠军心得",u"腰斩心得",u"牛人专访"]
     return rst
+
+
+def get_wanzhu_consult_list(**kwargs):
+    """
+    """
+    qset = cm.Consult.objects.all().order_by("-ctime")
+    if kwargs.get("username"):
+        qset = qset.filter(user_name__icontains=kwargs.get("username"))
+    if kwargs.get("reply_status"):
+        qset = qset.filter(reply_status=kwargs.get("reply_status"))
+    if kwargs.get("content"):
+        qset = qset.filter(Q(content__icontains=kwargs.get("content"))|Q(reply_content__icontains=kwargs.get("content")))
+    data = list(qset.values())
+    for item in data:
+        user_id = item["user_id"]
+        userinfo = get_user_info(user_id)
+        if userinfo:
+            item["user_code"] = userinfo.get("usercode")
+
+    #分页
+    page = int(kwargs.get("page",1))
+    page_size = int(kwargs.get("page_size",20))
+    if page and page_size:
+        total,data = ccf.get_page_list(data,page,page_size)
+    else:
+        total = len(data)
+    return total,data
+
+
+def get_sub_category(pid):
+    """
+    """
+    qset = cm.BaikeCategory.objects.filter(parent_id=pid)
+    qdata = list(qset.values())
+    if qdata:
+        for subitem in qdata:
+            subitem["type"] = "ent"
+            subitem["children"] = get_sub_category(subitem["id"])                                                                    
+    return qdata
+
+
+def get_baike_category_tree(**kwargs):
+	"""
+	"""
+	parents = list(cm.BaikeCategory.objects.filter(parent_id__isnull=True).values())
+	for item in parents:
+		item["children"] = get_sub_category(item["id"])
+	return parents
+
+
+def get_baike_list_by_category(**kwargs):
+    category_id = kwargs.get("category_id")
+    qset = cm.BaikeDetail.objects.filter(category_id=category_id)
+    data = list(qset.values("id","name"))
+    return data
+
+
+def get_baike_detail(**kwargs):
+    #_id = kwargs.get("id")
+    category_id = kwargs.get("category_id")
+    data = list(cm.BaikeDetail.objects.filter(category_id=category_id).values())
+    return data
+
+

+ 4 - 0
src/weixin/urls_backstage.py

@@ -81,6 +81,10 @@ urlpatterns = [
     url(r'^v3/profit/rank/list$', views.ProfitRankListView.as_view()),
     url(r'^v3/group/rank$', views.V3GroupRankView.as_view()),
     url(r'^v3/article/type/list$', views.V3ArticleTypeListView.as_view()),
+    url(r'^v3/consult/list$', views.ConsultListView.as_view()),
+    url(r'^v3/baike/category/list$', views.BaikeCategoryListView.as_view()),
+    url(r'^v3/baike/list$', views.BaikeListView.as_view()),
+    url(r'^v3/baike/detail$', views.BaikeDetailView.as_view()),
 
 ]
 

+ 80 - 0
src/weixin/views.py

@@ -1216,3 +1216,83 @@ class V3ArticleTypeListView(cv.BaseView):
         except Exception as e:                                                     
             cv.tracefail()                                                         
             return cv.to_fail(e)
+
+
+class ConsultListView(cv.AuthView):
+    def get(self, request):
+        """#顽主咨询列表(平台管理后台)
+        @name:"股票名称"
+        @page:1
+        @page_size:20
+        """
+        qdata = request.json
+        try:
+            total,rst = ctl.get_wanzhu_consult_list(**qdata)
+            return cv.to_suc({"total":total,"list":rst})
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+
+class BaikeCategoryListView(cv.AuthView):
+    def get(self, request):
+        """#百科词条分类列表(平台管理后台)
+        @name:"股票名称"
+        @page:1
+        @page_size:20
+        """
+        qdata = request.json
+        try:
+            rst = ctl.get_baike_category_tree(**qdata)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+
+class BaikeListView(cv.AuthView):
+    def get(self, request):
+        """#百科词条列表(平台管理后台)
+        @category_id:1,分类id
+        """
+        qdata = request.json
+        try:
+            rst = ctl.get_baike_list_by_category(**qdata)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+
+class BaikeDetailView(cv.AuthView):
+    def get(self, request):
+        """#百科词条列表(平台管理后台)
+        @id:1,百科id
+        """
+        qdata = request.json
+        try:
+            rst = ctl.get_baike_detail(**qdata)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)
+
+
+    def post(self, request):
+        """#新增百科词条(3.0小程序)
+        """
+        qdata = request.json
+        now = datetime.datetime.now()
+        need_params = ["name","content"]
+        mse = ccf.check_params(*need_params,**qdata)
+        if mse:
+            raise ce.TipException(mse)
+        try:
+            vals = ccf.get_need_params(*need_params,**qdata)
+            vals["cid"] = request.user.get("id",0)
+            vals["cname"] = request.user.get("username","")
+            rst = ctl.add_model(self,**vals)
+            return cv.to_suc(rst)
+        except Exception as e:
+            cv.tracefail()
+            return cv.to_fail(e)