|
|
|
@ -44,6 +44,7 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
foreach($cash as $k=>$v){
|
|
|
|
|
$senddata[$v['p_id']] = $v;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//内冲
|
|
|
|
|
$inside = self::getJoinPromoteData([],$istimeselect,"promote_coin");
|
|
|
|
|
foreach($inside as $k=>$v){
|
|
|
|
@ -56,20 +57,24 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
$senddata[$v['p_id']] = $v;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//官方渠道单算
|
|
|
|
|
//判断公司
|
|
|
|
|
$gfflah = false;
|
|
|
|
|
if (isset($_REQUEST['company_id']) && $_REQUEST['company_id']==0) {
|
|
|
|
|
$gfflah = true;
|
|
|
|
|
$gfidlag = true;
|
|
|
|
|
$gfgs = true;
|
|
|
|
|
if (isset($_REQUEST['company_id'])) {
|
|
|
|
|
if($_REQUEST['company_id']!=0){
|
|
|
|
|
$gfgs = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (isset($_REQUEST['promote_id'])) {
|
|
|
|
|
if($_REQUEST['promote_id'] == 0){
|
|
|
|
|
$gfflah = true;
|
|
|
|
|
$gfidlag = true;
|
|
|
|
|
}else{
|
|
|
|
|
$gfflah =false;
|
|
|
|
|
$gfidlag =false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if($gfflah){
|
|
|
|
|
if($gfidlag && $gfgs){
|
|
|
|
|
//计算官方渠道
|
|
|
|
|
unset($_REQUEST['company_id']);
|
|
|
|
|
$_REQUEST['promote_id'] = 0;
|
|
|
|
@ -145,7 +150,7 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
private function getJoinPromoteData($map,$istimeselect,$type="spend")
|
|
|
|
|
{
|
|
|
|
|
// setPowerPromoteIds($map,"s.promote_id");
|
|
|
|
|
if ($_REQUEST['promote_id'] != '') {
|
|
|
|
|
if (isset($_REQUEST['promote_id'])) {
|
|
|
|
|
if ($_REQUEST['promote_id'] == 0) {
|
|
|
|
|
$map['s.promote_id'] = 0;
|
|
|
|
|
} else {
|
|
|
|
@ -159,6 +164,7 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
$map['promote.company_id'] = $_REQUEST['company_id'];
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if($type == "spend"){
|
|
|
|
|
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) {
|
|
|
|
|
$map["s.game_id"] = array("in",implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
|
|
|
|
@ -166,7 +172,6 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
if($istimeselect){
|
|
|
|
|
$map['s.pay_time']=$istimeselect;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$map['s.pay_status']=1;
|
|
|
|
|
$field= "SUM(CASE WHEN pay_way > 0 THEN pay_amount ELSE 0 END) as cash_count,
|
|
|
|
|
SUM(CASE WHEN pay_way = 0 THEN pay_amount ELSE 0 END) as balance_coin_count,
|
|
|
|
|