|
|
|
@ -16,13 +16,24 @@ class CompanyGameRatioModel extends Model
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$is_inside = M("PromoteCompany","tab_")->field("is_inside")->where("id='{$company_id}'")->find()['is_inside'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//设置默认
|
|
|
|
|
$game_ratio = [];
|
|
|
|
|
$tmp_g = explode(",",$game_ids);
|
|
|
|
|
for ($i=0; $i < count($tmp_g); $i++) {
|
|
|
|
|
$game_id = $tmp_g[$i];
|
|
|
|
|
if ($is_inside){
|
|
|
|
|
$game_ratio[$game_id] = [
|
|
|
|
|
"begintime" => $begintime,
|
|
|
|
|
"endtime"=>$endtime,
|
|
|
|
|
"ratio"=>0,
|
|
|
|
|
"turnover_ratio"=>''
|
|
|
|
|
];
|
|
|
|
|
}else{
|
|
|
|
|
$game_ratio[$game_id] = $this->getGameRadio($company_id,$game_id,$company_belong,$begintime,$endtime);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return $game_ratio;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|