|
|
|
@ -694,6 +694,9 @@ class PromoteController extends ThinkController
|
|
|
|
|
*/
|
|
|
|
|
public function spend_list()
|
|
|
|
|
{
|
|
|
|
|
if(!array_key_exists("timeStart",$_REQUEST)){
|
|
|
|
|
$this->redirect(ACTION_NAME, array('timeStart' => date('Y-m-d',strtotime('-30 day')),"timeEnd"=>date('Y-m-d')));
|
|
|
|
|
}
|
|
|
|
|
if (isset($_REQUEST['game_name'])) {
|
|
|
|
|
if ($_REQUEST['game_name']=='全部') {
|
|
|
|
|
unset($_REQUEST['game_name']);
|
|
|
|
@ -799,7 +802,7 @@ class PromoteController extends ThinkController
|
|
|
|
|
setPowerPromoteIds($map);
|
|
|
|
|
// dd($map);
|
|
|
|
|
$model = array(
|
|
|
|
|
'm_name' => 'Spend',
|
|
|
|
|
'm_name' => 'spend use index(promote_time)',
|
|
|
|
|
'map' => $map,
|
|
|
|
|
'order' => 'id desc',
|
|
|
|
|
'title' => '渠道充值',
|
|
|
|
@ -814,9 +817,9 @@ class PromoteController extends ThinkController
|
|
|
|
|
];
|
|
|
|
|
//为数据权限添加
|
|
|
|
|
setPowerPromoteIds($map2);
|
|
|
|
|
$total = null_to_0(D('Spend')->where($map1)->sum('pay_amount'));//累计充值
|
|
|
|
|
$ttotal = null_to_0(D('Spend')->where(['pay_time' => total(1, false)])->where($map2)->sum('pay_amount'));//昨日充值
|
|
|
|
|
$ytotal = null_to_0(D('Spend')->where(['pay_time' => total(5, false)])->where($map2)->sum('pay_amount'));//今日充值
|
|
|
|
|
$total = null_to_0(M('Spend use index(promote_time)',"tab_")->where($map1)->sum('pay_amount'));//累计充值
|
|
|
|
|
$ttotal = null_to_0(M('Spend use index(promote_time)',"tab_")->where(['pay_time' => total(1, false)])->where($map2)->sum('pay_amount'));//昨日充值
|
|
|
|
|
$ytotal = null_to_0(M('Spend use index(promote_time)',"tab_")->where(['pay_time' => total(5, false)])->where($map2)->sum('pay_amount'));//今日充值
|
|
|
|
|
// dd($total,$ttotal,$ytotal);
|
|
|
|
|
$this->assign('total', $total);
|
|
|
|
|
$this->assign('ttotal', $ttotal);
|
|
|
|
|