|
|
|
@ -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();
|
|
|
|
|