master
chenzhi 5 years ago
parent 74ff06d549
commit ae03347437

@ -275,11 +275,12 @@ class StatisticsController extends ThinkController {
private function promote_data_order($starttime,$endtime){
//注册排行
$IndexChart = M("IndexChart","tab_");
//
$map = array(
"date"=>['between',[$starttime,$endtime]]
);
$PromoteCount = M("PromoteCount","tab_");
//获取当前注册前十名
$new_user_count = $PromoteCount->field("promote_account,new_user_count")->where("`date` {$starttime}")->order("new_user_count desc")->limit(10)->select(false);
echo "<pre>";dump($new_user_count);die();
}

@ -100,6 +100,8 @@ class StatisticsCountSetController extends Controller {
$this->promotePayMoeny();
$this->promoteActive();
$this->promoteCreateDb();
unset($this->addid);
unset($this->adddata);
$this->addid = [];
$this->adddata = [];
$this->gameNew();
@ -116,7 +118,7 @@ class StatisticsCountSetController extends Controller {
//1聚合新增
public function promoteNew()
{
$map = ['register_time'=>['between',[$this->beginTime,$this->endTime]],"puid"=>0,"promote_id"=>["gt",0]];//0不是小号
$map = ['register_time'=>['between',[$this->beginTime,$this->endTime]],"puid"=>0,"promote_id"=>["gt",0]];
$promoteNew = $this->UserModel->field('COUNT(1) AS new_user_count,promote_id,promote_account')
->where($map)
->group("promote_id")
@ -177,7 +179,7 @@ class StatisticsCountSetController extends Controller {
foreach ($this->adddata as $key => $value) {
$value['date']=$this->beginTime;
$value['create_time']=$this->nowdata;
$value['active_user_list'] = @json_encode(explode(",",$value['active_user_list']));
$value['active_user_list'] = @json_encode(array_map("intFun",explode(",",$value['active_user_list'])));
if(empty($value['promote_account']) && $value['promote_id']){
$value['promote_account'] = $this->PromoteModel->field("account")->where("id = {$value['promote_id']}")->find()['account'];
}
@ -254,7 +256,7 @@ class StatisticsCountSetController extends Controller {
foreach ($this->adddata as $key => $value) {
$value['date']=$this->beginTime;
$value['create_time']=$this->nowdata;
$value['active_user_list'] = @json_encode(explode(",",$value['active_user_list']));
$value['active_user_list'] = @json_encode(array_map("intFun",explode(",",$value['active_user_list'])));
$tempdbres = $this->GameCountModel->add($value);
if($tempdbres === false){
$this->model->rollback();

Loading…
Cancel
Save