@@ -577,7 +577,16 @@ left join src_book_info c on a.dt=c.dt and a.book=c.book and a.type=c.type and
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))}" if user_id not in super_auth else ''
+
+ if user_id in super_auth:
+ op =''
+ else:
+ if len(UserAuthUtils.get_auth_channel(user_id))==0:
+ return None,None,None
+ op = f" and a.channel in {str(UserAuthUtils.get_auth_channel(user_id))}"
op1=f" and a.channel='{channel}'" if channel else ''
@@ -23,12 +23,15 @@ def get_auth_channel(user_id):
left join channel_group b on a.channel_group_id=b.id
where user_id={user_id}"""
- data2 = tuple(db.quchen_text.getOne(sql2).split(','))
- sql3 = f"""select nick_name from t_mp_account where id in {str(data2)}"""
- data3= db.zx.getOneList(sql3)
-
+ data2 = db.quchen_text.getOne(sql2)
+ if data2:
+ data2_2 = tuple(data2.split(','))
+ sql3 = f"""select nick_name from t_mp_account where id in {str(data2_2)}"""
+ data3= db.zx.getOneList(sql3)
+ data3 =[]
return tuple(data1+data3)
if __name__ == '__main__':
- print(get_auth_channel(78))
+ print(get_auth_channel(118))