11月功能提交

master
zhengyongxing 4 years ago
parent 5c27c63835
commit 3d1ab70123

@ -771,7 +771,29 @@ class TimingController extends AdminController {
$return = []; $return = [];
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
$info = [];
$pool_data = M("company_statement_pool","tab_")
->field("id")
->where("(statement_begin_time <={$end_time} AND ( statement_end_time = 0 OR statement_end_time >= {$start_time})) and withdraw_type=3 and statement_ids like '%{$value['id']}%'")
->select();
foreach ($pool_data as $pk => $pv) {
$info = M("company_statement_info","tab_")
->field("statement_info")
->where("(statement_begin_time <={$end_time} AND ( statement_end_time = 0 OR statement_end_time >= {$start_time})) and withdraw_type=3 and pool_id = {$pv['id']} and company_id = {$value['company_id']}")
->find()['statement_info'];
if ($info) {
break;
}
}
if ($info) {
$statement_info = json_decode($info,true);
} else {
$statement_info = json_decode($value['statement_info'],true); $statement_info = json_decode($value['statement_info'],true);
}
$is_inside = M("PromoteCompany","tab_")->field("is_inside")->where("id='{$value['company_id']}'")->find()['is_inside']; $is_inside = M("PromoteCompany","tab_")->field("is_inside")->where("id='{$value['company_id']}'")->find()['is_inside'];
if ($value['company_type'] == 2) { if ($value['company_type'] == 2) {
@ -787,7 +809,7 @@ class TimingController extends AdminController {
continue; continue;
} }
// //
if (isset($return[$statement_info['promote_id'].$v['relation_game_id']])) { if (isset($return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']])) {
$return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] = !$is_inside?$v['sum_money']:0; $return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] = !$is_inside?$v['sum_money']:0;
} else { } else {
$return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] += !$is_inside?$v['sum_money']:0; $return[$value['company_id']."-".$sval['promote_id']."-".$v['relation_game_id']] += !$is_inside?$v['sum_money']:0;
@ -834,14 +856,14 @@ class TimingController extends AdminController {
} }
} }
// dump($return);
return $return; return $return;
} }
public function test() { public function test() {
// $this->getSpecialComplement(strtotime(date("Y-m-1",strtotime("2020-07"))),strtotime(date("Y-m-t",strtotime("2020-07")))+86399,2259); $this->getSpecialComplement(strtotime(date("Y-m-1",strtotime("2020-08"))),strtotime(date("Y-m-t",strtotime("2020-08")))+86399,2259);
dump(D("CompanyGameRatio")->getPromoteCompanyGameRatio(18,(string)207,1600099200,1603728000,1)); // dump(D("CompanyGameRatio")->getPromoteCompanyGameRatio(18,(string)207,1600099200,1603728000,1));
// $this->createMarketBonus("all"); // $this->createMarketBonus("all");
} }

Loading…
Cancel
Save