From d9b54f8973b678d67772bd4ac75b9e9838e7813f Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Tue, 31 Mar 2020 19:08:09 +0800 Subject: [PATCH] =?UTF-8?q?OA=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FengHuoApi2Controller.class.php | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/Application/Sdk/Controller/FengHuoApi2Controller.class.php b/Application/Sdk/Controller/FengHuoApi2Controller.class.php index 877e2b19..c41c1ff7 100644 --- a/Application/Sdk/Controller/FengHuoApi2Controller.class.php +++ b/Application/Sdk/Controller/FengHuoApi2Controller.class.php @@ -241,27 +241,33 @@ class FengHuoApi2Controller extends GetInfoBaseController{ // 默认排序:id降序 $order = 'login_time asc'; - $where['login_time'] = array('neq',0); +// $where['login_time'] = array('neq',0); $data = M('user_login_record','tab_') - ->field('user_id,game_name,server_name,login_time,user_account,game_player_name') + ->field('tab_user_login_record.id,tab_user_login_record.id,user_id,game_name,server_name,login_time,user_account,game_player_name,CASE WHEN promote_id = 0 THEN "官方渠道" ELSE account END as promote_account') + ->join("left join tab_promote as promote on tab_user_login_record.promote_id=promote.id") ->where($where) ->order($order) ->page($page, $row) ->select(); - foreach ($data as $k=>$v){ - $promoteId = $v['promote_id']; - if($promoteId == 0){ - $data[$k]['promote_account'] = '官方渠道'; - }else{ - $promote_account = M('promote','tab_') - ->field('account') - ->where('id',$promoteId) - ->find(); - $data[$k]['promote_account'] = $promote_account; - } - } +// echo $data;die(); +// foreach ($data as $k=>$v){ +// $promoteId = $v['promote_id']; +// if($promoteId == 0){ +// $data[$k]['promote_account'] = '官方渠道'; +// }else{ +// $promote_account = M('promote','tab_') +// ->field('account') +// ->where('id',$promoteId) +// ->find(); +// +// $data[$k]['promote_account'] = $promote_account; +// } +// +// } + +// dump($data);die(); if($data){ $result = [