新增返利游戏

master
elf 1 year ago
parent 701c26c132
commit c41855045c

@ -44,7 +44,7 @@ class RebateCommand extends HyperfCommand
$this->setDescription('返利'); $this->setDescription('返利');
$this->addOption('timeRange', 'T', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, '时间范围', [time()-10*60, time()]); $this->addOption('timeRange', 'T', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, '时间范围', [time()-10*60, time()]);
$this->addOption('date', 'D', InputOption::VALUE_OPTIONAL, '日期', date('Y-m-d',strtotime('-1 day'))); $this->addOption('date', 'D', InputOption::VALUE_OPTIONAL, '日期', date('Y-m-d',strtotime('-1 day')));
$this->addOption('gameId', 'G', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, '游戏', [11, 17]); $this->addOption('gameId', 'G', InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL, '游戏', [11, 17, 21]);
} }
public function handle() public function handle()

@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Helper\RebateGiftItem;
class Game21
{
public function getAllItems() {
return [
'B' => $this->getBItems(),
'G' => $this->getGItems(),
'H' => $this->getHItems(),
'L' => $this->getLItems(),
];
}
public function getBItems()
{
return [
['gift_key' => 'B-50', 'amount' => 50, 'gifts' => [['id' => 120, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '20000元宝'],
['gift_key' => 'B-150', 'amount' => 150, 'gifts' => [['id' => 121, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '30000元宝'],
['gift_key' => 'B-300', 'amount' => 300, 'gifts' => [['id' => 122, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '40000元宝'],
['gift_key' => 'B-500', 'amount' => 500, 'gifts' => [['id' => 123, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '50000元宝'],
['gift_key' => 'B-750', 'amount' => 750, 'gifts' => [['id' => 124, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '60000元宝'],
['gift_key' => 'B-1000', 'amount' => 1000, 'gifts' => [['id' => 125, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '70000元宝'],
['gift_key' => 'B-1500', 'amount' => 1500, 'gifts' => [['id' => 126, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '80000元宝'],
['gift_key' => 'B-2000', 'amount' => 2000, 'gifts' => [['id' => 127, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '100000元宝'],
];
}
public function getGItems()
{
$gifts = [
['id' => 105, 'num' => 1],
['id' => 106, 'num' => 1],
['id' => 107, 'num' => 1],
['id' => 108, 'num' => 1],
['id' => 130, 'num' => 1],
['id' => 131, 'num' => 1],
];
return [
['gift_key' => 'G-0', 'amount' => 0, 'gifts' => $gifts, 'game_currency' => 0, 'gift_content' => '进游福利1-4号礼包直播福利1-2号礼包'],
];
}
public function getHItems()
{
$gifts = [
['id' => 119, 'num' => 1],
];
return [
['gift_key' => 'H-0', 'amount' => 0, 'gifts' => $gifts, 'game_currency' => 0, 'gift_content' => '每日打卡10000元宝'],
];
}
public function getLItems()
{
return [
['gift_key' => 'L-165', 'amount' => 165, 'gifts' => [['id' => 111, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '3280元宝'],
['gift_key' => 'L-205', 'amount' => 205, 'gifts' => [['id' => 112, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '3280元宝'],
['gift_key' => 'L-245', 'amount' => 245, 'gifts' => [['id' => 113, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '6480元宝'],
['gift_key' => 'L-285', 'amount' => 285, 'gifts' => [['id' => 114, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '6480元宝'],
['gift_key' => 'L-315', 'amount' => 315, 'gifts' => [['id' => 115, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '10000元宝'],
['gift_key' => 'L-345', 'amount' => 345, 'gifts' => [['id' => 116, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '10000元宝'],
['gift_key' => 'L-375', 'amount' => 375, 'gifts' => [['id' => 117, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '10000元宝'],
['gift_key' => 'L-405', 'amount' => 405, 'gifts' => [['id' => 118, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '20000元宝'],
];
}
}

@ -12,6 +12,7 @@ class Manager
return [ return [
11 => Game11::class, 11 => Game11::class,
17 => Game17::class, 17 => Game17::class,
21 => Game21::class,
]; ];
} }

@ -28,6 +28,9 @@ class RebateService extends Service
$configs = [ $configs = [
11 => ['is_daily_repeat' => false], 11 => ['is_daily_repeat' => false],
]; ];
$configs = [
21 => ['is_daily_repeat' => false],
];
return $configs[$baseGame->id] ?? $commonConfig; return $configs[$baseGame->id] ?? $commonConfig;
} }

Loading…
Cancel
Save