Browse Source

FIX:订单系统

cxyu 3 years ago
parent
commit
7d3d89794f
1 changed files with 3 additions and 6 deletions
  1. 3 6
      handlers/OrderHandler.py

+ 3 - 6
handlers/OrderHandler.py

@@ -125,10 +125,7 @@ class OrderInfo(BaseHandler):
         op7 = f" and from_unixtime(d.create_time) <='{user_end}' " if user_end else ''
         op8 = f" and a.order_id='{order_id}'" if order_id else ''
         op9 = f" and a.mem_id='{member_id}'" if member_id else ''
-        if status:
-            op10 = f" and a.status=2 " if int(status) == 2 else ' and a.status!=2 '
-        else:
-            op10 = ''
+        op10 = f" and a.status={status} " if status else ''
         op11 = f" and e.name='{game}'" if game else ''
         print(agent_name)
         if agent_name == '自然流量渠道':
@@ -159,7 +156,7 @@ class OrderInfo(BaseHandler):
                         if(a.create_time is not null ,CONVERT(from_unixtime(a.create_time),char(20)),null) order_time,
                         if(d.create_time is not null,CONVERT(from_unixtime(d.create_time),char(20)),null) user_create_time,
                         d.id as user_id,e.name as game ,a.amount ,a.real_amount ,g.server_name ,
-                        CONVERT (g.role_name USING utf8) as role_name,a.payway ,if(a.status!=2,1,2 ) status ,a.mem_id
+                        CONVERT (g.role_name USING utf8) as role_name,a.payway ,a.status status ,a.mem_id
                         from db_mp.h_pay a
                         left join
                         (select b.agent_id as agent_id,b.advertiser_conf_id  from 
@@ -171,7 +168,7 @@ 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.id = f.mem_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 quchen_text.advertiser_vx h on c.wx_name =h.name 
                         left join db_mp.h_user q on a.agent_id =q.id