cola 2 年 前
コミット
dea5b8b2e4
2 ファイル変更2 行追加2 行削除
  1. 1 1
      data_manage/pitcher_panel.py
  2. 1 1
      handlers/PitcherPanelHandler.py

+ 1 - 1
data_manage/pitcher_panel.py

@@ -132,7 +132,7 @@ def get_channel_overview(user_id, channel, pitcher, type , stage, book,agent_id,
     op2 = f" and a.channel='{channel}'" if channel else ''
     op3 = f" and a.dt>='{start}' " if start else ''
     op4 = f" and a.dt<='{end}' " if end else ''
-    op5 = f" order by {order_by} {order}" if order_by and order else 'cost'
+    op5 = f" order by {order_by} {order}" if order_by and order else ''
     op6 = f" and stage='{stage}'" if stage else ''
     op7 = f" and book='{book}'" if book else ''
     op8 = f" and agent_id = '{agent_id}'" if agent_id else ''

+ 1 - 1
handlers/PitcherPanelHandler.py

@@ -80,7 +80,7 @@ class ChannelOverview(BaseHandler):
             type = args.get('type')
             agent_id= args.get('agent_id')
             page_size = args.get("page_size")
-            order_by = args.get("order_by", 'date')
+            order_by = args.get("order_by", 'cost')
             order = args.get("order", 'desc')
             data, total, total_data = get_channel_overview(user_id, channel, pitcher, type, stage, book, agent_id, start, end, page,
                                                            page_size, order_by, order)