|
|
|
@ -35,7 +35,7 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
$this->UserModel =M("User","tab_");
|
|
|
|
|
$this->ChartModel =SM("IndexChart","tab_");
|
|
|
|
|
$this->LoginModel =M("user_login_record","tab_");
|
|
|
|
|
$this->SpendModel =SM("spend","tab_");
|
|
|
|
|
$this->SpendModel =M("spend","tab_");
|
|
|
|
|
$this->PromoteModel =M("promote","tab_");
|
|
|
|
|
$this->nowdata =time();
|
|
|
|
|
if(I("reset")) $this->reset = true;
|
|
|
|
@ -191,6 +191,7 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
}
|
|
|
|
|
$this->adddata["pay_user_hours"] = json_encode($user_hours);
|
|
|
|
|
unset($user_hours);
|
|
|
|
|
D("Spend")->addSubsiteWhere($map);
|
|
|
|
|
$activeCount = $this->SpendModel->field('user_id')
|
|
|
|
|
->where($map)
|
|
|
|
|
->group('user_id')
|
|
|
|
@ -206,6 +207,7 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
public function payMoney()
|
|
|
|
|
{
|
|
|
|
|
$map = ['pay_time'=>['between',[$this->beginTime,$this->endTime]],"pay_status"=>1];//1支付成功
|
|
|
|
|
D("Spend")->addSubsiteWhere($map);
|
|
|
|
|
$hoursnews = $this->SpendModel->field('FROM_UNIXTIME(pay_time, "%H") as time,sum(pay_amount) AS money')
|
|
|
|
|
->where($map)
|
|
|
|
|
->group("time")
|
|
|
|
@ -278,7 +280,10 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
$allcount['android_gamesource_count'] = M("GameSource","tab_")->where("file_type = 1")->field("count(1) game_count")->find()['game_count'];//安卓游戏原包
|
|
|
|
|
$allcount['ios_gamesource_count'] = M("GameSource","tab_")->where("file_type = 2")->field("count(1) game_count")->find()['game_count'];//IOS游戏原包
|
|
|
|
|
$allcount['promote_user_count'] = $user->where("promote_id > 0 and puid = 0")->field("count(1) user_count")->find()['user_count'];//推广员注册用户
|
|
|
|
|
$allcount['promote_spend_sum'] = $spend->where("promote_id > 0 and pay_status = 1")->field("sum(pay_amount) pay_amount")->find()['pay_amount'];//推广员总充值
|
|
|
|
|
|
|
|
|
|
$promoteMap = [];
|
|
|
|
|
D("Spend")->addSubsiteWhere($promoteMap);
|
|
|
|
|
$allcount['promote_spend_sum'] = $spend->where("promote_id > 0 and pay_status = 1")->where($promoteMap)->field("sum(pay_amount) pay_amount")->find()['pay_amount'];//推广员总充值
|
|
|
|
|
|
|
|
|
|
$this->adddata["all_count"] = json_encode($allcount);
|
|
|
|
|
}
|
|
|
|
|