|
|
|
@ -334,7 +334,8 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
"zfb"=>0,
|
|
|
|
|
"gfzfb"=>0,
|
|
|
|
|
"sqzfb"=>0,
|
|
|
|
|
"sqkj"=>0
|
|
|
|
|
"sqkj"=>0,
|
|
|
|
|
"ybzf"=>0,
|
|
|
|
|
];
|
|
|
|
|
$this->getSpendPayWay($moneyarry);
|
|
|
|
|
$this->getGameSupersignPayWay($moneyarry);
|
|
|
|
@ -377,13 +378,24 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
"type"=>5,"sort"=>3,
|
|
|
|
|
"sum_money"=>number_format($moneyarry['sqkj']/100, 2, '.', '')
|
|
|
|
|
);
|
|
|
|
|
$this->adddata[] = array(
|
|
|
|
|
"key_name"=>'ybzf_count',
|
|
|
|
|
"type"=>4,"sort"=>5,
|
|
|
|
|
"sum_money"=>number_format($moneyarry['ybzf']/100, 2, '.', '')
|
|
|
|
|
);
|
|
|
|
|
$this->adddata[] = array(
|
|
|
|
|
"key_name"=>'ybzf_count',
|
|
|
|
|
"type"=>5,"sort"=>4,
|
|
|
|
|
"sum_money"=>number_format($moneyarry['ybzf']/100, 2, '.', '')
|
|
|
|
|
);
|
|
|
|
|
echo 'success';
|
|
|
|
|
}
|
|
|
|
|
//获取spend表
|
|
|
|
|
protected function getSpendPayWay(&$moneyarry){
|
|
|
|
|
$map = array(
|
|
|
|
|
"pay_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
|
|
|
|
|
"pay_status"=>1,
|
|
|
|
|
"pay_way"=>array("IN","1,2,3,9,15")
|
|
|
|
|
"pay_way"=>array("IN","1,2,3,9,15,17")
|
|
|
|
|
);
|
|
|
|
|
$dbres=$this->SpendModel
|
|
|
|
|
->field("
|
|
|
|
@ -391,7 +403,8 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 3 THEN pay_amount ELSE 0 END),0) as wxapp_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_amount ELSE 0 END),0) as zfbgf_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 9 THEN pay_amount ELSE 0 END),0) as zfbsq_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 15 THEN pay_amount ELSE 0 END),0) as kjsq_count
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 15 THEN pay_amount ELSE 0 END),0) as kjsq_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 17 THEN pay_amount ELSE 0 END),0) as ybzf_count
|
|
|
|
|
")
|
|
|
|
|
->where($map)
|
|
|
|
|
->find();
|
|
|
|
@ -399,6 +412,7 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
$moneyarry['gfzfb'] += $dbres['zfbgf_count']*100;
|
|
|
|
|
$moneyarry['sqzfb'] += $dbres['zfbsq_count']*100;
|
|
|
|
|
$moneyarry['sqkj'] += $dbres['kjsq_count']*100;
|
|
|
|
|
$moneyarry['ybzf'] += $dbres['ybzf_count']*100;
|
|
|
|
|
}
|
|
|
|
|
//获取超级签购买
|
|
|
|
|
protected function getGameSupersignPayWay(&$moneyarry)
|
|
|
|
@ -410,12 +424,14 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
$dbres=$this->GameSupersignModel
|
|
|
|
|
->field("
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 2 THEN pay_price ELSE 0 END),0) as wx_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_price ELSE 0 END),0) as zfb_count
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_price ELSE 0 END),0) as zfb_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_price ELSE 0 END),0) as ybzf_count
|
|
|
|
|
")
|
|
|
|
|
->where($map)
|
|
|
|
|
->find();
|
|
|
|
|
$moneyarry['wx'] += $dbres['wx_count']*100;
|
|
|
|
|
$moneyarry['gfzfb'] += $dbres['zfb_count']*100;
|
|
|
|
|
$moneyarry['ybzf'] += $dbres['ybzf_count']*100;
|
|
|
|
|
}
|
|
|
|
|
//玩家购买平台币
|
|
|
|
|
protected function getDepositPayWay(&$moneyarry)
|
|
|
|
@ -423,7 +439,7 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
$map = array(
|
|
|
|
|
"create_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)),
|
|
|
|
|
"pay_status"=>1,
|
|
|
|
|
"pay_way"=>array("IN","1,2,3,9,15")
|
|
|
|
|
"pay_way"=>array("IN","1,2,3,9,15,17")
|
|
|
|
|
);
|
|
|
|
|
$dbres=$this->DepositModel
|
|
|
|
|
->field("
|
|
|
|
@ -431,7 +447,8 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 3 THEN pay_amount ELSE 0 END),0) as wxapp_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_amount ELSE 0 END),0) as zfbgf_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 9 THEN pay_amount ELSE 0 END),0) as zfbsq_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 15 THEN pay_amount ELSE 0 END),0) as kjsq_count
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 15 THEN pay_amount ELSE 0 END),0) as kjsq_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 17 THEN pay_amount ELSE 0 END),0) as ybzf_count
|
|
|
|
|
")
|
|
|
|
|
->where($map)
|
|
|
|
|
->find();
|
|
|
|
@ -439,6 +456,7 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
$moneyarry['gfzfb'] += $dbres['zfbgf_count']*100;
|
|
|
|
|
$moneyarry['sqzfb'] += $dbres['zfbsq_count']*100;
|
|
|
|
|
$moneyarry['sqkj'] += $dbres['kjsq_count']*100;
|
|
|
|
|
$moneyarry['ybzf'] += $dbres['ybzf_count']*100;
|
|
|
|
|
}
|
|
|
|
|
//会长充值平台币
|
|
|
|
|
protected function getCoinPayOrderPayWay(&$moneyarry)
|
|
|
|
@ -450,12 +468,14 @@ class FinancialSummarySetController extends \Think\Controller
|
|
|
|
|
$dbres= $this->CoinPayOrderModel
|
|
|
|
|
->field("
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 2 THEN pay_amount ELSE 0 END),0) as wx_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_amount ELSE 0 END),0) as zfb_count
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 1 THEN pay_amount ELSE 0 END),0) as zfb_count,
|
|
|
|
|
IFNULL(SUM(CASE WHEN pay_way = 17 THEN pay_amount ELSE 0 END),0) as ybzf_count
|
|
|
|
|
")
|
|
|
|
|
->where($map)
|
|
|
|
|
->find();
|
|
|
|
|
$moneyarry['wx'] += $dbres['wx_count']*100;
|
|
|
|
|
$moneyarry['gfzfb'] += $dbres['zfb_count']*100;
|
|
|
|
|
$moneyarry['ybzf'] += $dbres['ybzf_count']*100;
|
|
|
|
|
}
|
|
|
|
|
public function addDb()
|
|
|
|
|
{
|
|
|
|
|