|
@@ -2,6 +2,7 @@ from model.DateUtils import DateUtils
|
|
|
from model.DataBaseUtils import *
|
|
|
from model.log import logger
|
|
|
from model.CommonUtils import *
|
|
|
+from model import UserAuthUtils
|
|
|
du = DateUtils()
|
|
|
|
|
|
log = logger()
|
|
@@ -572,9 +573,12 @@ left join src_book_info c on a.dt=c.dt and a.book=c.book and a.type=c.type and
|
|
|
print(data)
|
|
|
return data,total,total_data
|
|
|
|
|
|
-def get_channel_summary(channel,pitcher,page,page_size,order_by,order,state,location,start,end):
|
|
|
+def get_channel_summary(user_id,channel,pitcher,page,page_size,order_by,order,state,location,start,end):
|
|
|
db=MysqlUtils()
|
|
|
|
|
|
+ op = f" and a.channel in {str(UserAuthUtils.get_auth_channel(user_id))}"
|
|
|
+ print(op)
|
|
|
+
|
|
|
op1=f" and a.channel='{channel}'" if channel else ''
|
|
|
|
|
|
if pitcher:
|
|
@@ -612,7 +616,7 @@ def get_channel_summary(channel,pitcher,page,page_size,order_by,order,state,loca
|
|
|
|
|
|
from dw_channel a
|
|
|
left join dw_channel_amount_daily_reverse b using (dt,channel)
|
|
|
- where 1=1 {op1} {op2} {op6} {op7} GROUP BY a.channel,type,pitcher,stage) x
|
|
|
+ where 1=1 {op} {op1} {op2} {op6} {op7} GROUP BY a.channel,type,pitcher,stage) x
|
|
|
having 1=1 {op4} {op5} ORDER BY {order_by} {order}
|
|
|
|
|
|
|