diff --git a/app/Command/RebateCommand.php b/app/Command/RebateCommand.php index bb785e5..b5e3bc3 100644 --- a/app/Command/RebateCommand.php +++ b/app/Command/RebateCommand.php @@ -44,7 +44,7 @@ class RebateCommand extends HyperfCommand $this->setDescription('返利'); $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('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() diff --git a/app/Helper/RebateGiftItem/Game21.php b/app/Helper/RebateGiftItem/Game21.php new file mode 100644 index 0000000..d22617f --- /dev/null +++ b/app/Helper/RebateGiftItem/Game21.php @@ -0,0 +1,70 @@ + $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元宝'], + ]; + } +} \ No newline at end of file diff --git a/app/Helper/RebateGiftItem/Manager.php b/app/Helper/RebateGiftItem/Manager.php index d6c210a..0575a3b 100644 --- a/app/Helper/RebateGiftItem/Manager.php +++ b/app/Helper/RebateGiftItem/Manager.php @@ -12,6 +12,7 @@ class Manager return [ 11 => Game11::class, 17 => Game17::class, + 21 => Game21::class, ]; } diff --git a/app/Service/RebateService.php b/app/Service/RebateService.php index 1d74e2c..c642845 100644 --- a/app/Service/RebateService.php +++ b/app/Service/RebateService.php @@ -28,6 +28,9 @@ class RebateService extends Service $configs = [ 11 => ['is_daily_repeat' => false], ]; + $configs = [ + 21 => ['is_daily_repeat' => false], + ]; return $configs[$baseGame->id] ?? $commonConfig; }