diff --git a/Application/Admin/Controller/PromoteGameRatioController.class.php b/Application/Admin/Controller/PromoteGameRatioController.class.php index 3e9105e12..ce6b4bba8 100644 --- a/Application/Admin/Controller/PromoteGameRatioController.class.php +++ b/Application/Admin/Controller/PromoteGameRatioController.class.php @@ -6,11 +6,30 @@ use Think\Controller; class PromoteGameRatioController extends ThinkController { + const MODEL_NAME = 'promote_game_ratio'; + public function lists() { $params = I('get.'); $promoteAccount = $params['promote_account'] ?? ''; $gameId = $params['game_id'] ?? 0; $status = $params['status'] ?? ''; + + $map['_string'] = '1 = 1'; + if ($promoteAccount) { + $promoteMap['account'] = $promoteAccount; + $promoteId = M('promote', 'tab_')->where($promoteMap)->getField('id'); + $promoteId = $promoteId ?? 0; + $map['promote_id'] = $promoteId; + } + if ($gameId) { + $map['game_id'] = $gameId; + } + if ($status !== '') { + $map['status'] = $status; + } + + $field = 'create_time, update_time'; + $query = D(self::MODEL_NAME)->getLists(); } } \ No newline at end of file diff --git a/Application/Admin/Model/PromoteGameRatioModel.class.php b/Application/Admin/Model/PromoteGameRatioModel.class.php index 715ec4169..ea16a31f0 100644 --- a/Application/Admin/Model/PromoteGameRatioModel.class.php +++ b/Application/Admin/Model/PromoteGameRatioModel.class.php @@ -2,7 +2,7 @@ namespace Admin\Model; -class PromoteGameRatioModel +class PromoteGameRatioModel extends CommentModel { } \ No newline at end of file diff --git a/Application/Home/Common/function.php b/Application/Home/Common/function.php index 2827ba43b..d473d7d5c 100644 --- a/Application/Home/Common/function.php +++ b/Application/Home/Common/function.php @@ -1201,7 +1201,7 @@ function getChildGameAddPermission($promoteId) function gameSearch($relationGameId, $sdkVersion) { - $map = '1 = 1'; + $map['_string'] = '1 = 1'; if ($relationGameId != 0) { $map['relation_game_id'] = $relationGameId; }