|
|
@ -75,20 +75,6 @@ class SubSpendController extends ThinkController
|
|
|
|
unset($_REQUEST['merchant_id']);
|
|
|
|
unset($_REQUEST['merchant_id']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// $marketAdminId = 0;
|
|
|
|
|
|
|
|
// $isMarketAdmin = isMarketAdmin();
|
|
|
|
|
|
|
|
// if ($isMarketAdmin) {
|
|
|
|
|
|
|
|
// $userAuth = session('user_auth');
|
|
|
|
|
|
|
|
// $marketAdminId = $userAuth['uid'];
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $marketAdminId = I('market_admin_id', 0);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if ($marketAdminId > 0) {
|
|
|
|
|
|
|
|
// $map['market_admin_id'] = $marketAdminId;
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// setPowerPromoteIds($map,'promote_id');
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (isset($_REQUEST['promote_id']) || isset($_REQUEST['company_id'])) {
|
|
|
|
if (isset($_REQUEST['promote_id']) || isset($_REQUEST['company_id'])) {
|
|
|
|
$promoteId = I('promote_id',-1);
|
|
|
|
$promoteId = I('promote_id',-1);
|
|
|
|
$companyId = I('company_id',-1);
|
|
|
|
$companyId = I('company_id',-1);
|
|
|
@ -122,20 +108,7 @@ class SubSpendController extends ThinkController
|
|
|
|
$map['game_id'] = ['in',$game_id];
|
|
|
|
$map['game_id'] = ['in',$game_id];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// if (intval(($endTime + 1) - $startTime) / (24 * 3600) <= 31) {
|
|
|
|
|
|
|
|
// $map1 = $map;
|
|
|
|
|
|
|
|
// $map1['pay_status'] = 1;
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $map = '1 = 2';
|
|
|
|
|
|
|
|
// $map1 = $map;
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// $this->checkListOrCountAuthRestMap($map,["extend", "pay_order_number", "user_account"]);
|
|
|
|
|
|
|
|
D("Spend")->addSubsiteWhere($map);
|
|
|
|
D("Spend")->addSubsiteWhere($map);
|
|
|
|
|
|
|
|
|
|
|
|
$map1 = $map;
|
|
|
|
|
|
|
|
$map1['pay_status'] = 1;
|
|
|
|
|
|
|
|
$total = null_to_0(M(self::model_name,"tab_")->where($map1)->sum('pay_amount'));
|
|
|
|
|
|
|
|
$this->assign('total', $total);
|
|
|
|
|
|
|
|
$this->meta_title = $this->m_title = '游戏充值';
|
|
|
|
$this->meta_title = $this->m_title = '游戏充值';
|
|
|
|
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Spend/lists', 'status' => 1])->find());
|
|
|
|
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Spend/lists', 'status' => 1])->find());
|
|
|
|
|
|
|
|
|
|
|
@ -183,8 +156,11 @@ class SubSpendController extends ThinkController
|
|
|
|
$endTime = strtotime($endDate) + 86399;
|
|
|
|
$endTime = strtotime($endDate) + 86399;
|
|
|
|
$map['pay_time'] = array('BETWEEN', array($startTime, $endTime));
|
|
|
|
$map['pay_time'] = array('BETWEEN', array($startTime, $endTime));
|
|
|
|
$is_sub_data = I("issubdata",0);
|
|
|
|
$is_sub_data = I("issubdata",0);
|
|
|
|
$SpendModel = M("spend","tab_",SUBSITE_DB);
|
|
|
|
if($is_sub_data == 1){
|
|
|
|
|
|
|
|
$SpendModel = M("spend","tab_",SUBSITE_DB);
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
$SpendModel = M("spend","tab_");
|
|
|
|
|
|
|
|
}
|
|
|
|
unset($_REQUEST['timestart']);
|
|
|
|
unset($_REQUEST['timestart']);
|
|
|
|
unset($_REQUEST['timeend']);
|
|
|
|
unset($_REQUEST['timeend']);
|
|
|
|
|
|
|
|
|
|
|
@ -661,6 +637,10 @@ class SubSpendController extends ThinkController
|
|
|
|
if ($page) {
|
|
|
|
if ($page) {
|
|
|
|
$data['page'] = $page;
|
|
|
|
$data['page'] = $page;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$total = null_to_0($SpendModel->where($map)->where("pay_status = 1")->sum('pay_amount'));
|
|
|
|
|
|
|
|
$this->assign('total', $total);
|
|
|
|
|
|
|
|
|
|
|
|
return $data;
|
|
|
|
return $data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|