|
|
|
@ -808,7 +808,7 @@ class TimingController extends AdminController {
|
|
|
|
|
|
|
|
|
|
// var_dump($desposit);die();
|
|
|
|
|
$payway_spend = M()->table("({$spend}) spend")
|
|
|
|
|
->field("sum(pay_amount) as pay_amount,pay_time,promote_id,game_name,game_id,relation_game_id,pay_way,sdk_version")
|
|
|
|
|
->field("sum(pay_amount) as pay_amount,pay_time,promote_id,game_name,game_id,relation_game_id,pay_way,sdk_version,market_admin_id")
|
|
|
|
|
->where($map)
|
|
|
|
|
->group("pay_time,promote_id,game_name,pay_way,market_admin_id")
|
|
|
|
|
->select();
|
|
|
|
@ -862,13 +862,13 @@ class TimingController extends AdminController {
|
|
|
|
|
//将时间、推广员id、游戏名、设备类型作为键值标记渠道费用
|
|
|
|
|
if (!$channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']]) {
|
|
|
|
|
if (!$value['pay_way']) {
|
|
|
|
|
$channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']] = 0;
|
|
|
|
|
$channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name'].$value['market_admin_id']] = 0;
|
|
|
|
|
}
|
|
|
|
|
$channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']]
|
|
|
|
|
$channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name'].$value['market_admin_id']]
|
|
|
|
|
= $value['pay_amount'] * ($pay_rate[$value['pay_way']]/100);
|
|
|
|
|
} else {
|
|
|
|
|
$channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']]
|
|
|
|
|
= $channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']]+($value['pay_amount'] * ($pay_rate[$value['pay_way']]/100));
|
|
|
|
|
$channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name'].$value['market_admin_id']]
|
|
|
|
|
= $channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name'].$value['market_admin_id']]+($value['pay_amount'] * ($pay_rate[$value['pay_way']]/100));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -907,7 +907,7 @@ class TimingController extends AdminController {
|
|
|
|
|
//下游流水
|
|
|
|
|
$promote_data[$key]['promote_amount'] = $value['pay_amount'] * ($promote_radio * 0.01);
|
|
|
|
|
//渠道费用
|
|
|
|
|
$promote_data[$key]['channel_amount'] = $channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name']];
|
|
|
|
|
$promote_data[$key]['channel_amount'] = $channel_fee[$value['pay_time'].$value['promote_id'].$value['game_name'].$value['admin_id']];
|
|
|
|
|
$tax = 0;
|
|
|
|
|
//公司税费
|
|
|
|
|
foreach($tax_radio as $k => $v) {
|
|
|
|
|