|
|
|
@ -56,11 +56,15 @@ class PayChannelController extends ThinkController
|
|
|
|
|
|
|
|
|
|
$map['pay_status'] = $coinMap['pay_status'] = 1;
|
|
|
|
|
$map['pay_way'] = array('egt',1);
|
|
|
|
|
if(IS_SUBSITE){
|
|
|
|
|
$map['partner_type']=PARTNER_TYPE;
|
|
|
|
|
$coinMap['tab_deposit.partner_type']=PARTNER_TYPE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// setPowerPromoteIds($map,'promote_id');
|
|
|
|
|
|
|
|
|
|
//游戏币计算
|
|
|
|
|
$data = M('spend use index(pay_channel)','tab_')
|
|
|
|
|
$data = SM('spend use index(pay_channel)','tab_',true)
|
|
|
|
|
->field("game_name,sum(pay_amount) as pay_amount,game_id,sdk_version")
|
|
|
|
|
->where($map)
|
|
|
|
|
->group('game_id')
|
|
|
|
@ -79,7 +83,6 @@ class PayChannelController extends ThinkController
|
|
|
|
|
->where($coinMap)
|
|
|
|
|
->group("game_id")
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
// unset($coinMap['game_id']);
|
|
|
|
|
//平台币充值
|
|
|
|
|
$coinSum = M('deposit','tab_')
|
|
|
|
@ -94,12 +97,13 @@ class PayChannelController extends ThinkController
|
|
|
|
|
foreach($coinData as $key => $value) {
|
|
|
|
|
$handleCoinData[$value['game_id']] = $value['platform_coin'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//测试白名单
|
|
|
|
|
$testList = implode(",",M("test_white_list","tab_")->getField("user_id",true));
|
|
|
|
|
//测试数据汇总计算
|
|
|
|
|
$testData = M('spend','tab_')
|
|
|
|
|
$testData = SM('spend','tab_')
|
|
|
|
|
->field("sum(pay_amount) as test_coin,game_name,game_id")
|
|
|
|
|
->join("inner join tab_test_white_list on tab_spend.user_id=tab_test_white_list.user_id")
|
|
|
|
|
->where($map)
|
|
|
|
|
->where("user_id in ({$testList})")
|
|
|
|
|
->group('game_id')
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
@ -131,6 +135,7 @@ class PayChannelController extends ThinkController
|
|
|
|
|
$data[$key]['sdk_version'] =getGameTypeName($data[$key]['sdk_version']);
|
|
|
|
|
}
|
|
|
|
|
$superMap = $map;
|
|
|
|
|
if(isset($superMap['partner_type'])) unset($superMap['partner_type']);
|
|
|
|
|
unset($superMap['payed_time']);
|
|
|
|
|
$superMap['pay_time'] = $map['payed_time'];
|
|
|
|
|
// unset($superMap['promote_id']);
|
|
|
|
@ -446,6 +451,7 @@ class PayChannelController extends ThinkController
|
|
|
|
|
->select(false);
|
|
|
|
|
|
|
|
|
|
$superMap = $map;
|
|
|
|
|
if(isset($superMap['partner_type'])) unset($superMap['partner_type']);
|
|
|
|
|
if ($map['payed_time']){
|
|
|
|
|
$superMap['pay_time'] = $map['payed_time'];
|
|
|
|
|
unset($superMap['payed_time']);
|
|
|
|
|