Merge branch 'feature/add_item' of wmtx/platform into release

内团去除比例结束时间减1
master
郑永星 4 years ago committed by Gogs
commit 66902a13ec

@ -1616,9 +1616,16 @@ class MarketPercentageController extends ThinkController
}
$belong_game = M("company_belong_game","tab_")
->where("((begin_time<={$time_start} and (end_time >={$time_start} or end_time=0)) or (begin_time<={$time_end} and end_time >={$time_end}) or (end_time>={$time_start} and end_time <={$time_end})) and id != {$id}")
->select();
if ($_POST['end_time']) {
$belong_game = M("company_belong_game","tab_")
->where("((begin_time<={$time_start} and (end_time >={$time_start} or end_time=0)) or (begin_time<={$time_end} and end_time >={$time_end}) or (end_time>={$time_start} and end_time <={$time_end})) and id != {$id}")
->select();
} else {
$belong_game = M("company_belong_game","tab_")
->where("(begin_time>={$time_start} or (end_time >={$time_start})) and id != {$id}")
->select();
}
if ($belong_game) {

@ -46,7 +46,7 @@ class CompanyGameRatioModel extends Model
foreach($company_belong_game as $key => $value) {
if ($value['begin_time'] > $company_begin_time) {
$game_ratio[$game_id] = array_merge($game_ratio[$game_id],$this->getGameRadio($company_id,$game_id,$company_belong,$company_begin_time,$value['begin_time']));
$game_ratio[$game_id] = array_merge($game_ratio[$game_id],$this->getGameRadio($company_id,$game_id,$company_belong,$company_begin_time,$value['begin_time']-1));
if ($value['end_time'] >= $company_end_time || !$value['end_time']) {
// $game_ratio[$game_id] = array_merge($game_ratio[$game_id],[[

Loading…
Cancel
Save