|
|
|
@ -1102,8 +1102,19 @@ function getGameSelleRatioByPromote($promoteId = null, $gameId = null)
|
|
|
|
|
if (empty($promoteId) || empty($gameId)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
$map['promote_id'] = intval($promoteId);
|
|
|
|
|
$map['game_id'] = intval($gameId);
|
|
|
|
|
$promoteId = intval($promoteId);
|
|
|
|
|
$gameId = intval($gameId);
|
|
|
|
|
$promote = M('promote', 'tab_')->find($promoteId);
|
|
|
|
|
if (empty($promote)) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if ($promote['level'] != 1) {
|
|
|
|
|
$promoteId = explode('/', trim($promote['chain'], '/'))[0];
|
|
|
|
|
$promoteId = intval($promoteId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$map['promote_id'] = $promoteId;
|
|
|
|
|
$map['game_id'] = $gameId;
|
|
|
|
|
$promoteGameRatio = M('promote_game_ratio', 'tab_')->where($map)->find();
|
|
|
|
|
|
|
|
|
|
if (empty($promoteGameRatio) || $promoteGameRatio['status'] != 1) {
|
|
|
|
|