@@ -107,6 +107,13 @@ where 1=1 {op1}
print(sql)
return db.dm.getData_json(sql)
+def get_agent_list():
+ db = MysqlUtils()
+ sql="""
+ select distinct agent_id, agent_name from dw_channel where agent_id is not null and agent_id!= ''
+ """
+ return db.dm.getData_json(sql)
+
def get_channel_overview(user_id, channel, pitcher, stage, book,agentId, start, end, page, page_size, order_by, order):
db = MysqlUtils()
@@ -88,6 +88,16 @@ class ChannelOverview(BaseHandler):
else:
self.write_json(data=data, total=total, total_data=total_data)
+class AgentList(BaseHandler):
+ def get(self):
+ if not self._au:
+ self.write_fail(msg='auth error')
+ else:
+ data = get_agent_list()
+ self.write_json(data=data)
class ChannelAgainOrderTrend(BaseHandler):
def post(self):
@@ -12,6 +12,7 @@ urls = [
(r'/data/pitcher_panel/daily', PitcherPanelDaily), # 投手日期汇总
(r'/data/pitcher_panel/overview', PitcherPanelOverview), # 投手今天概况
(r'/data/channel_stat/overview', ChannelOverview), # 公众号广告投放数据
+ (r'/data/channel_stat/agent_list', AgentList), # 获取所有的渠道列表
(r'/data/channel_stat/again_order_trend', ChannelAgainOrderTrend), # 公众号复冲趋势
(r'/data/channel_stat/active', ChannelActive), # 公众号激活数据
(r'/data/channel_stat/order_trend', ChannelOrderTrend), # 公众号趋势