|
@@ -107,12 +107,15 @@ class OrderInfo(BaseHandler):
|
|
|
db = MysqlUtils()
|
|
|
if user_id in super_auth():
|
|
|
op = ''
|
|
|
+ op_sup1 = ''
|
|
|
else:
|
|
|
+ op_sup1 = f' and i.start_date is not null and a.create_time >= unix_timestamp(i.start_date) '
|
|
|
+
|
|
|
+
|
|
|
if len(UserAuthUtils.get_auth_channel(user_id)) == 0:
|
|
|
return None, None, None
|
|
|
elif len(UserAuthUtils.get_auth_channel(user_id)) == 1:
|
|
|
op = f" and c.wx_name = '{UserAuthUtils.get_auth_channel(user_id)[0]}'"
|
|
|
-
|
|
|
else:
|
|
|
op = f" and c.wx_name in {str(UserAuthUtils.get_auth_channel(user_id))}"
|
|
|
|
|
@@ -168,13 +171,13 @@ class OrderInfo(BaseHandler):
|
|
|
left join db_mp.mp_mp_conf c on b.advertiser_conf_id = c.id
|
|
|
left join db_mp.h_member d on a.mem_id = d.id
|
|
|
left join db_mp.h_game e on a.app_id =e.id
|
|
|
- left join db_mp.h_mem_game f on a.mem_id = f.mem_id
|
|
|
- left join db_mp.h_mg_role g on g.mg_mem_id = f.id
|
|
|
+ left join db_mp.h_mg_role g on g.mg_mem_id = a.mg_mem_id
|
|
|
left join quchen_text.advertiser_vx h on c.wx_name =h.name
|
|
|
left join db_mp.h_user q on a.agent_id =q.id
|
|
|
+ left join quchen_text.advertiser_vx i on c.wx_name =i.name
|
|
|
+
|
|
|
|
|
|
-
|
|
|
- where 1=1 {op} {op1} {op2} {op3} {op4} {op5}
|
|
|
+ where 1=1 {op} {op_sup1} {op1} {op2} {op3} {op4} {op5}
|
|
|
{op6} {op7} {op8} {op9} {op10}
|
|
|
{op11} {op12}
|
|
|
|