@@ -401,7 +401,7 @@ def boss_panel_summary(user_id,start,end,channel,pitcher, type, stage, page, pag
op3 = f" and dt<='{end}' " if end else ''
op4 = f" and type='{type}' " if type else ''
op5= f" and stage='{stage}' " if stage else ''
- op6 = f" and channel='{channel}' " if stage else ''
+ op6 = f" and channel='{channel}' " if channel else ''
op7 = f" order by {order_by} {order}" if order_by and order else 'order by dt desc'
dm = MysqlUtils().dm
@@ -0,0 +1,42 @@
+from handlers.HandlerBase import BaseHandler
+from model.DataBaseUtils import MysqlUtils
+import json
+import requests
+from data_manage.operate import *
+db = MysqlUtils()
+
+class ChannelAnalysisHandler(BaseHandler):
+ APP_MAP = {
+ "user_channel": user_channel,
+ }
+ def post(self):
+ arg = self.get_args()
+ print(arg)
+ try:
+ data = self.run(arg)
+ self.write_json(data=data)
+ except Exception as e:
+ print(e)
+ self.write_fail()
+ def run(self, arg):
+ app = self.request.full_url().split('/')[-1]
+ return self.run_function(self.APP_MAP[app], arg)
+ def run_function(self, func, arg):
+ return func(arg)
@@ -4,6 +4,7 @@ from handlers.GitHookHandler import *
from handlers.PublicAnalysisHandler import *
from handlers.TaskHandler import *
from handlers import OperateHandler
+from handlers import AnalysisHandler
urls = [
@@ -51,6 +52,9 @@ urls = [
# CRUD
(r'/operate/channel_group.*', OperateHandler.ChannelGroupHandler), # 公众号分组设置
+ # 自助分析
+ (r'/data/analysis.*', AnalysisHandler.ChannelAnalysisHandler), # 公众号分组设置
]