|
|
|
@ -132,7 +132,7 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
foreach($hoursnews as $h) {
|
|
|
|
|
$user_hours[$h['time']] = (integer)$h['news'];
|
|
|
|
|
}
|
|
|
|
|
$this->adddata["new_user_hours"] = serialize($user_hours);
|
|
|
|
|
$this->adddata["new_user_hours"] = json_encode($user_hours);
|
|
|
|
|
unset($user_hours);
|
|
|
|
|
//获取当日所有的注册用户
|
|
|
|
|
$userList = $this->UserModel->field('count(1) count')
|
|
|
|
@ -159,7 +159,7 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
foreach($hoursnews as $h) {
|
|
|
|
|
$user_hours[$h['time']] = (integer)$h['active'];
|
|
|
|
|
}
|
|
|
|
|
$this->adddata["active_user_hours"] = serialize($user_hours);
|
|
|
|
|
$this->adddata["active_user_hours"] = json_encode($user_hours);
|
|
|
|
|
unset($user_hours);
|
|
|
|
|
//获取活跃用户列表
|
|
|
|
|
$activeCount = $this->LoginModel->field('user_id')
|
|
|
|
@ -168,7 +168,7 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
$this->adddata["active_user_count"] = count($activeCount);
|
|
|
|
|
$this->adddata["active_user_list"] = serialize(array_column($activeCount,'user_id'));
|
|
|
|
|
$this->adddata["active_user_list"] =json_encode(array_map("intFun",array_column($activeCount,'user_id')));
|
|
|
|
|
unset($activeCount);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
@ -189,7 +189,7 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
foreach($hoursnews as $h) {
|
|
|
|
|
$user_hours[$h['time']] = (integer)$h['payuser'];
|
|
|
|
|
}
|
|
|
|
|
$this->adddata["pay_user_hours"] = serialize($user_hours);
|
|
|
|
|
$this->adddata["pay_user_hours"] = json_encode($user_hours);
|
|
|
|
|
unset($user_hours);
|
|
|
|
|
$activeCount = $this->SpendModel->field('user_id')
|
|
|
|
|
->where($map)
|
|
|
|
@ -197,7 +197,7 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
->select();
|
|
|
|
|
|
|
|
|
|
$this->adddata["pay_user_count"] = count($activeCount);
|
|
|
|
|
$this->adddata["pay_user_list"] = serialize(array_column($activeCount,'user_id'));
|
|
|
|
|
$this->adddata["pay_user_list"] = json_encode(array_map("intFun",array_column($activeCount,'user_id')));
|
|
|
|
|
unset($activeCount);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
@ -220,7 +220,7 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
foreach($hoursnews as $h) {
|
|
|
|
|
$user_hours[$h['time']] = (integer)$h['money'];
|
|
|
|
|
}
|
|
|
|
|
$this->adddata["pay_money_hours"] = serialize($user_hours);
|
|
|
|
|
$this->adddata["pay_money_hours"] = json_encode($user_hours);
|
|
|
|
|
unset($user_hours);
|
|
|
|
|
|
|
|
|
|
$activeCount = $this->SpendModel->field('sum(pay_amount) AS money')
|
|
|
|
@ -248,7 +248,7 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
foreach($hoursnews as $h) {
|
|
|
|
|
$user_hours[$h['time']] = (integer)$h['news'];
|
|
|
|
|
}
|
|
|
|
|
$this->adddata["promote_new_hours"] = serialize($user_hours);//promote_new_hours
|
|
|
|
|
$this->adddata["promote_new_hours"] = json_encode($user_hours);//promote_new_hours
|
|
|
|
|
unset($user_hours);
|
|
|
|
|
|
|
|
|
|
$activeCount = $this->PromoteModel->field('COUNT(1) AS news')
|
|
|
|
@ -274,7 +274,7 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
$allcount['player_count'] =$spend->player();
|
|
|
|
|
$allcount['money_sum'] =$spend->totalAmount();
|
|
|
|
|
$allcount['promote_sum'] =$promote->total();
|
|
|
|
|
$this->adddata["all_count"] = serialize($allcount);
|
|
|
|
|
$this->adddata["all_count"] = json_encode($allcount);
|
|
|
|
|
}
|
|
|
|
|
public function createDb()
|
|
|
|
|
{
|
|
|
|
@ -282,5 +282,5 @@ class IndexChartSetController extends AdminController {
|
|
|
|
|
$this->adddata['create_time']=$this->nowdata;
|
|
|
|
|
$this->ChartModel->add($this->adddata);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|