|
|
@ -1102,15 +1102,17 @@ function getGameSelleRatioByPromote($promoteId = null, $gameId = null)
|
|
|
|
if (empty($promoteId) || empty($gameId)) {
|
|
|
|
if (empty($promoteId) || empty($gameId)) {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$promoteId = intval($promoteId);
|
|
|
|
$promoteId = intval($promoteId);
|
|
|
|
$gameId = intval($gameId);
|
|
|
|
$gameId = intval($gameId);
|
|
|
|
$promote = M('promote', 'tab_')->find($promoteId);
|
|
|
|
$promote = M('promote', 'tab_')->find($promoteId);
|
|
|
|
|
|
|
|
|
|
|
|
if (empty($promote)) {
|
|
|
|
if (empty($promote)) {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($promote['level'] != 1) {
|
|
|
|
if ($promote['level'] != 1) {
|
|
|
|
$promoteId = explode('/', trim($promote['chain'], '/'))[0];
|
|
|
|
$chain = explode('/', trim($promote['chain'], '/'));
|
|
|
|
$promoteId = intval($promoteId);
|
|
|
|
$promoteId = empty($chain[0]) ? 0 : intval($chain[0]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$map['promote_id'] = $promoteId;
|
|
|
|
$map['promote_id'] = $promoteId;
|
|
|
|