@ -241,27 +241,33 @@ class FengHuoApi2Controller extends GetInfoBaseController{
// 默认排序: id降序
// 默认排序: id降序
$order = 'login_time asc';
$order = 'login_time asc';
$where['login_time'] = array('neq',0);
// $where['login_time'] = array('neq',0);
$data = M('user_login_record','tab_')
$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)
->where($where)
->order($order)
->order($order)
->page($page, $row)
->page($page, $row)
->select();
->select(false);
foreach ($data as $k=>$v){
$promoteId = $v['promote_id'];
// echo $data;die();
if($promoteId == 0){
// foreach ($data as $k=>$v){
$data[$k]['promote_account'] = '官方渠道';
// $promoteId = $v['promote_id'];
}else{
// if($promoteId == 0){
$promote_account = M('promote','tab_')
// $data[$k]['promote_account'] = '官方渠道';
->field('account')
// }else{
->where('id',$promoteId)
// $promote_account = M('promote','tab_')
->find();
// ->field('account')
$data[$k]['promote_account'] = $promote_account;
// ->where('id',$promoteId)
}
// ->find();
//
// $data[$k]['promote_account'] = $promote_account;
// }
//
// }
}
// dump($data);die();
if($data){
if($data){
$result = [
$result = [