|
|
|
@ -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();
|
|
|
|
|
}
|
|
|
|
|
}
|