From e9f9a421f52fb05a5c1367aca35af5441c24950a Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Fri, 20 Dec 2019 15:07:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0>=E6=8E=A8?= =?UTF-8?q?=E5=B9=BF=E5=91=98=E7=AE=A1=E7=90=86>=E5=85=AC=E4=BC=9A?= =?UTF-8?q?=E5=88=86=E6=88=90=E7=AE=A1=E7=90=86--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Common/extend.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index a47c1b93e..b34d3c73d 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -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) {