You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1524 lines
110 KiB
PHP

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
declare(strict_types=1);
namespace App\Service;
use App\Model\BaseGame;
use App\Model\PlayerRole;
use App\Model\RebateGift;
use App\Model\RebateOrder;
use App\Model\RebateTimesSetting;
use App\Model\Server;
use App\Model\SimulateSpend;
use App\Model\Spend;
use Hyperf\DbConnection\Db as DB;
class RebateService extends Service
{
const AUTO_REVIEW = false;
public function getBaseGameConfig($baseGame)
{
$commonConfig = [
'is_daily_repeat' => true,
];
$configs = [
75 => ['is_daily_repeat' => false],
79 => ['is_daily_repeat' => false],
81 => ['is_daily_repeat' => false],
84 => ['is_daily_repeat' => false],
];
return $configs[$baseGame->id] ?? $commonConfig;
}
public function getProps($baseGameId)
{
$props = [];
$props[75] = [
'I-8' => [['ref_id' => 99996014, 'name' => '8元充值卡', 'value' => 8]],
'I-12' => [['ref_id' => 99996015, 'name' => '12元充值卡', 'value' => 12]],
'I-18' => [['ref_id' => 99996016, 'name' => '18元充值卡', 'value' => 18]],
'I-25' => [['ref_id' => 99996017, 'name' => '25元充值卡', 'value' => 25]],
'I-38' => [['ref_id' => 99996024, 'name' => '38元充值卡', 'value' => 38]],
'I-50' => [['ref_id' => 99996018, 'name' => '50元充值卡', 'value' => 50]],
'I-88' => [['ref_id' => 99996019, 'name' => '88元充值卡', 'value' => 88]],
'I-168' => [['ref_id' => 99996020, 'name' => '168元充值卡', 'value' => 168]],
'I-296' => [['ref_id' => 99996021, 'name' => '296元充值卡', 'value' => 296]],
'I-6' => [['ref_id' => 99996001, 'name' => '6元充值卡', 'value' => 6]],
'I-30' => [['ref_id' => 99996002, 'name' => '30云充值卡', 'value' => 30]],
'I-68' => [['ref_id' => 99996003, 'name' => '68元充值卡', 'value' => 68]],
'I-98' => [['ref_id' => 99996004, 'name' => '98元充值卡', 'value' => 98]],
'I-128' => [['ref_id' => 99996005, 'name' => '128元充值卡', 'value' => 128]],
'I-198' => [['ref_id' => 99996006, 'name' => '198元充值卡', 'value' => 198]],
'I-328' => [['ref_id' => 99996007, 'name' => '328元充值卡', 'value' => 328]],
'I-648' => [['ref_id' => 99996008, 'name' => '648元充值卡', 'value' => 648]],
'I-1000' => [['ref_id' => 99996009, 'name' => '1000元充值卡', 'value' => 1000]],
'I-2000' => [['ref_id' => 99996010, 'name' => '2000元充值卡', 'value' => 2000]],
'I-5000' => [['ref_id' => 99996011, 'name' => '5000元充值卡', 'value' => 5000]],
'I-10000' => [['ref_id' => 99996012, 'name' => '10000元充值卡', 'value' => 10000]],
];
// 仅用于测试
$props[9] = $props[75];
$props[79] = [
'I-6' => [['ref_id' => 99996201, 'name' => '6元充值卡', 'value' => 6]],
'I-30' => [['ref_id' => 99996202, 'name' => '30云充值卡', 'value' => 30]],
'I-68' => [['ref_id' => 99996203, 'name' => '68元充值卡', 'value' => 68]],
'I-98' => [['ref_id' => 99996204, 'name' => '98元充值卡', 'value' => 98]],
'I-128' => [['ref_id' => 99996205, 'name' => '128元充值卡', 'value' => 128]],
'I-198' => [['ref_id' => 99996206, 'name' => '198元充值卡', 'value' => 198]],
'I-328' => [['ref_id' => 99996207, 'name' => '328元充值卡', 'value' => 328]],
'I-648' => [['ref_id' => 99996208, 'name' => '648元充值卡', 'value' => 648]],
'I-1000' => [['ref_id' => 99996209, 'name' => '1000元充值卡', 'value' => 1000]],
'I-2000' => [['ref_id' => 99996210, 'name' => '2000元充值卡', 'value' => 2000]],
'I-5000' => [['ref_id' => 99996211, 'name' => '5000元充值卡', 'value' => 5000]],
'I-10000' => [['ref_id' => 99996212, 'name' => '10000元充值卡', 'value' => 10000]],
'I-3' => [['ref_id' => 99996213, 'name' => '3元充值卡', 'value' => 3]],
'I-8' => [['ref_id' => 99996214, 'name' => '8元充值卡', 'value' => 8]],
'I-12' => [['ref_id' => 99996215, 'name' => '12元充值卡', 'value' => 12]],
'I-18' => [['ref_id' => 99996216, 'name' => '18元充值卡', 'value' => 18]],
'I-25' => [['ref_id' => 99996217, 'name' => '25元充值卡', 'value' => 25]],
'I-50' => [['ref_id' => 99996218, 'name' => '50元充值卡', 'value' => 50]],
'I-88' => [['ref_id' => 99996219, 'name' => '88元充值卡', 'value' => 88]],
'I-168' => [['ref_id' => 99996220, 'name' => '168元充值卡', 'value' => 168]],
'I-296' => [['ref_id' => 99996221, 'name' => '296元充值卡', 'value' => 296]],
'I-298' => [['ref_id' => 99996222, 'name' => '298元充值卡', 'value' => 298]],
'I-698' => [['ref_id' => 99996223, 'name' => '698元充值卡', 'value' => 698]],
'I-38' => [['ref_id' => 99996224, 'name' => '38元充值卡', 'value' => 38]],
'I-60' => [['ref_id' => 99996225, 'name' => '60元充值卡', 'value' => 60]],
'I-199' => [['ref_id' => 99996226, 'name' => '199元充值卡', 'value' => 199]],
'I-998' => [['ref_id' => 99996227, 'name' => '998元充值卡', 'value' => 998]],
'I-1998' => [['ref_id' => 99996228, 'name' => '1998元充值卡', 'value' => 1998]],
'I-1314' => [['ref_id' => 99996229, 'name' => '1314元充值卡', 'value' => 1314]],
'I-58' => [['ref_id' => 99996230, 'name' => '58元充值卡', 'value' => 58]],
'I-108' => [['ref_id' => 99996231, 'name' => '108元充值卡', 'value' => 108]],
'I-188' => [['ref_id' => 99996232, 'name' => '188元充值卡', 'value' => 188]],
'I-388' => [['ref_id' => 99996233, 'name' => '388元充值卡', 'value' => 388]],
'I-1288' => [['ref_id' => 99996234, 'name' => '1288元充值卡', 'value' => 1288]],
'I-888' => [['ref_id' => 99996235, 'name' => '888元充值卡', 'value' => 888]],
];
$props[81] = [
'I-3' => [['ref_id' => 99996213, 'name' => '3元充值卡', 'value' => 3]],
'I-6' => [['ref_id' => 99996201, 'name' => '6元充值卡', 'value' => 6]],
'I-8' => [['ref_id' => 99996214, 'name' => '8元充值卡', 'value' => 8]],
'I-12' => [['ref_id' => 99996215, 'name' => '12元充值卡', 'value' => 12]],
'I-18' => [['ref_id' =>99996216 , 'name' => '18元充值卡', 'value' => 18]],
'I-25' => [['ref_id' =>99996217 , 'name' => '25元充值卡', 'value' => 25]],
'I-30' => [['ref_id' =>99996202 , 'name' => '30元充值卡', 'value' => 30]],
'I-38' => [['ref_id' =>99996224 , 'name' => '38元充值卡', 'value' => 38]],
'I-50' => [['ref_id' =>99996218 , 'name' => '50元充值卡', 'value' => 50]],
'I-58' => [['ref_id' =>99996230 , 'name' => '58元充值卡', 'value' => 58]],
'I-60' => [['ref_id' =>99996225 , 'name' => '60元充值卡', 'value' => 60]],
'I-68' => [['ref_id' =>99996203 , 'name' => '68元充值卡', 'value' => 68]],
'I-88' => [['ref_id' =>99996219 , 'name' => '88元充值卡', 'value' => 88]],
'I-98' => [['ref_id' =>99996204 , 'name' => '98元充值卡', 'value' => 98]],
'I-108' => [['ref_id' =>99996231 , 'name' => '108元充值卡', 'value' => 108]],
'I-128' => [['ref_id' =>99996205 , 'name' => '128元充值卡', 'value' => 128]],
'I-168' => [['ref_id' =>99996220 , 'name' => '168元充值卡', 'value' => 168]],
'I-188' => [['ref_id' =>99996232 , 'name' => '188元充值卡', 'value' => 188]],
'I-198' => [['ref_id' =>99996206 , 'name' => '198元充值卡', 'value' => 198]],
'I-199' => [['ref_id' =>99996226 , 'name' => '199元充值卡', 'value' => 199]],
'I-296' => [['ref_id' =>99996221 , 'name' => '296元充值卡', 'value' => 296]],
'I-298' => [['ref_id' =>99996222 , 'name' => '298元充值卡', 'value' => 298]],
'I-328' => [['ref_id' =>99996207 , 'name' => '328元充值卡', 'value' => 328]],
'I-388' => [['ref_id' =>99996233 , 'name' => '388元充值卡', 'value' => 388]],
'I-648' => [['ref_id' =>99996208 , 'name' => '648元充值卡', 'value' => 648]],
'I-698' => [['ref_id' => 99996223, 'name' => '698元充值卡', 'value' => 698]],
'I-888' => [['ref_id' => 99996235, 'name' => '888元充值卡', 'value' => 888]],
'I-998' => [['ref_id' => 99996227, 'name' => '998元充值卡', 'value' => 998]],
'I-1000' => [['ref_id' => 99996209, 'name' => '1000元充值卡', 'value' => 1000]],
'I-1288' => [['ref_id' => 99996234, 'name' => '1288元充值卡', 'value' => 1288]],
'I-1314' => [['ref_id' => 99996229, 'name' => '1314元充值卡', 'value' => 1314]],
'I-1998' => [['ref_id' => 99996228, 'name' => '1998元充值卡', 'value' => 1998]],
'I-2000' => [['ref_id' => 99996210, 'name' => '2000元充值卡', 'value' => 2000]],
'I-5000' => [['ref_id' => 99996211, 'name' => '5000元充值卡', 'value' => 5000]],
'I-10000' => [['ref_id' => 99996212, 'name' => '10000元充值卡', 'value' => 10000]],
];
$props[84] = [
'I-1' => [['ref_id' => 0, 'name' => '1元充值返利', 'value' => 1]],
'I-3' => [['ref_id' => 0, 'name' => '3元充值返利', 'value' => 3]],
'I-5' => [['ref_id' => 0, 'name' => '5元充值返利', 'value' => 5]],
'I-6' => [['ref_id' => 0, 'name' => '6元充值返利', 'value' => 6]],
'I-8' => [['ref_id' => 0, 'name' => '8元充值返利', 'value' => 8]],
'I-10' => [['ref_id' => 0, 'name' => '10元充值返利', 'value' => 10]],
'I-12' => [['ref_id' => 0, 'name' => '12元充值返利', 'value' => 12]],
'I-18' => [['ref_id' => 0, 'name' => '18元充值返利', 'value' => 18]],
'I-25' => [['ref_id' => 0, 'name' => '25元充值返利', 'value' => 25]],
'I-30' => [['ref_id' => 0, 'name' => '30元充值返利', 'value' => 30]],
'I-35' => [['ref_id' => 0, 'name' => '35元充值返利', 'value' => 35]],
'I-38' => [['ref_id' => 0, 'name' => '38元充值返利', 'value' => 38]],
'I-48' => [['ref_id' => 0, 'name' => '48元充值返利', 'value' => 48]],
'I-50' => [['ref_id' => 0, 'name' => '50元充值返利', 'value' => 50]],
'I-68' => [['ref_id' => 0, 'name' => '68元充值返利', 'value' => 68]],
'I-88' => [['ref_id' => 0, 'name' => '88元充值返利', 'value' => 88]],
'I-108' => [['ref_id' => 0, 'name' => '108元充值返利', 'value' => 108]],
'I-120' => [['ref_id' => 0, 'name' => '120元充值返利', 'value' => 120]],
'I-128' => [['ref_id' => 0, 'name' => '128元充值返利', 'value' => 128]],
'I-136' => [['ref_id' => 0, 'name' => '136元充值返利', 'value' => 136]],
'I-198' => [['ref_id' => 0 , 'name' => '198元充值返利', 'value' => 198]],
'I-199' => [['ref_id' => 0 , 'name' => '199元充值返利', 'value' => 199]],
'I-204' => [['ref_id' => 0 , 'name' => '204元充值返利', 'value' => 204]],
'I-328' => [['ref_id' => 0 , 'name' => '328元充值返利', 'value' => 328]],
'I-388' => [['ref_id' => 0 , 'name' => '388元充值返利', 'value' => 388]],
'I-400' => [['ref_id' => 0 , 'name' => '400元充值返利', 'value' => 400]],
'I-488' => [['ref_id' => 0 , 'name' => '488元充值返利', 'value' => 488]],
'I-648' => [['ref_id' => 0 , 'name' => '648元充值返利', 'value' => 648]],
'I-800' => [['ref_id' => 0 , 'name' => '800元充值返利', 'value' => 800]],
'I-988' => [['ref_id' => 0 , 'name' => '988元充值返利', 'value' => 988]],
'I-1000' => [['ref_id' => 0 , 'name' => '1000元充值返利', 'value' => 1000]],
'I-1288' => [['ref_id' => 0 , 'name' => '1288元充值返利', 'value' => 1288]],
'I-1688' => [['ref_id' => 0 , 'name' => '1688元充值返利', 'value' => 1688]],
'I-2000' => [['ref_id' => 0 , 'name' => '2000元充值返利', 'value' => 2000]],
'I-3000' => [['ref_id' => 0 , 'name' => '3000元充值返利', 'value' => 3000]],
'I-5000' => [['ref_id' => 0 , 'name' => '5000元充值返利', 'value' => 5000]],
'I-5888' => [['ref_id' => 0 , 'name' => '5888元充值返利', 'value' => 5888]],
'I-6888' => [['ref_id' => 0 , 'name' => '6888元充值返利', 'value' => 6888]],
'I-10000' => [['ref_id' => 0 , 'name' => '10000元充值返利', 'value' => 10000]],
'I-20000' => [['ref_id' => 0 , 'name' => '20000元充值返利', 'value' => 20000]],
];
$props[91] = [
'I-6' => [['ref_id' => 0, 'name' => '6元充值返利', 'value' => 6]],
'I-30' => [['ref_id' => 0, 'name' => '30元充值返利', 'value' => 30]],
'I-68' => [['ref_id' => 0, 'name' => '68元充值返利', 'value' => 68]],
'I-128' => [['ref_id' => 0, 'name' => '128元充值返利', 'value' => 128]],
'I-198' => [['ref_id' => 0 , 'name' => '198元充值返利', 'value' => 198]],
'I-328' => [['ref_id' => 0 , 'name' => '328元充值返利', 'value' => 328]],
'I-648' => [['ref_id' => 0 , 'name' => '648元充值返利', 'value' => 648]],
'I-1000' => [['ref_id' => 0 , 'name' => '1000元充值返利', 'value' => 1000]],
'I-2000' => [['ref_id' => 0 , 'name' => '2000元充值返利', 'value' => 2000]],
'I-5000' => [['ref_id' => 0 , 'name' => '5000元充值返利', 'value' => 5000]],
'I-10000' => [['ref_id' => 0 , 'name' => '10000元充值返利', 'value' => 10000]],
];
return $props[$baseGameId] ?? null;
}
private function getOrders(BaseGame $baseGame, array $timeRange, array $serverIds = null)
{
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
$orderQuery = Spend::where('pay_status', 1)->whereIn('game_id', $gameIds)->whereBetween('pay_time', $timeRange);
if (!is_null($serverIds)) {
$orderQuery->whereIn('server_id', $serverIds);
}
$orders = $orderQuery->get(['pay_order_number', 'game_player_id', 'pay_amount', 'server_id', 'pay_time'])->toArray();
$simulateOrderQuery = SimulateSpend::where('base_game_id', $baseGame->id)->whereBetween('review_time', $timeRange)->where('status', 1);
if (!is_null($serverIds)) {
$simulateOrderQuery->whereIn('server_id', $serverIds);
}
$simulateOrders = $simulateOrderQuery->get([
DB::raw('role_id as game_player_id'),
DB::raw('amount as pay_amount'),
DB::raw('order_no as pay_order_number'),
DB::raw('create_time as pay_time'),
'server_id'
])
->toArray();
return array_merge($orders, $simulateOrders);
}
/**
* 单笔充值福利生成
*/
public function generateSingle($baseGame, $timeRange)
{
$gifts = RebateGift::where('type', 'A')->where('base_game_id', $baseGame->id)->orderBy('amount', 'asc')->get();
if (count($gifts) == 0) {
return;
}
$orders = $this->getOrders($baseGame, $timeRange);
$orderNumbers = array_column($orders, 'pay_order_number');
$existItems = RebateOrder::whereIn('order_number', $orderNumbers)
->where('type', 'A')
->where('base_game_id', $baseGame->id)
->get(['order_number'])
->keyBy(function($item) {
return $item->order_number;
});
$roles = $this->getRolesByRoleIds($baseGame, array_column($orders, 'game_player_id'));
$records = [];
foreach ($orders as $order) {
$maxGift = null;
foreach ($gifts as $gift) {
if ($order['pay_amount'] >= $gift->amount) {
$maxGift = $gift;
}
}
if ($maxGift && empty($existItems[$order['pay_order_number']])) {
$role = $roles[$order['game_player_id']] ?? null;
$record = $this->getCommonRecord($baseGame, $role, $maxGift);
$record = array_merge($record, [
'pay_amount' => $order['pay_amount'],
'order_number' => $order['pay_order_number'],
]);
$records[] = $record;
}
}
RebateOrder::insert($records);
}
/**
* 单笔充值福利生成(暂时只是用玄灵契约)
*/
public function generateSingleTimes($baseGame, $timeRange)
{
$gifts = RebateGift::where('type', 'I')->where('base_game_id', $baseGame->id)->orderBy('amount', 'asc')->get();
if (count($gifts) == 0) {
return;
}
$defaultTimes = 0;
$setting = RebateTimesSetting::where('base_game_id', $baseGame->id)->where('type', 'I')->first();
if ($setting) {
$defaultTimes = $setting->default_times;
}
$orders = $this->getOrders($baseGame, $timeRange);
$orderNumbers = array_column($orders, 'pay_order_number');
$existItems = RebateOrder::whereIn('order_number', $orderNumbers)
->where('type', 'I')
->where('base_game_id', $baseGame->id)
->get(['order_number'])
->keyBy(function($item) {
return $item->order_number;
});
$roles = $this->getRolesByRoleIds($baseGame, array_column($orders, 'game_player_id'));
$records = [];
foreach ($orders as $order) {
$maxGift = null;
foreach ($gifts as $gift) {
if ($order['pay_amount'] >= $gift->amount) {
$maxGift = $gift;
}
}
if ($maxGift && empty($existItems[$order['pay_order_number']])) {
[$giftProps, $giftContents] = $this->getOrderProps($maxGift, $defaultTimes);
$role = $roles[$order['game_player_id']] ?? null;
$record = $this->getCommonRecord($baseGame, $role, $maxGift);
$record = array_merge($record, [
'pay_amount' => $order['pay_amount'],
'order_number' => $order['pay_order_number'],
'times' => $defaultTimes,
'props' => json_encode($giftProps, JSON_UNESCAPED_UNICODE),
'gift_content' => implode('|', $giftContents),
]);
$records[] = $record;
}
}
RebateOrder::insert($records);
}
private function getOrderProps($gift, $defaultTimes)
{
$props = $this->getProps($gift->base_game_id);
$giftProps = $props[$gift->gift_key];
$giftContents = [];
foreach ($giftProps as $key => $prop) {
$prop['num'] = $defaultTimes;
$giftProps[$key] = $prop;
$giftContents[] = $prop['name'] . '*' . $defaultTimes;
}
return [$giftProps, $giftContents];
}
private function getPayAmountGroupByRole($baseGame, $timeRange, $roleIds = null)
{
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
$spendQuery = Spend::where('pay_status', 1)
->whereIn('game_id', $gameIds)
->whereBetween('pay_time', $timeRange);
if (is_array($roleIds)) {
$spendQuery->whereIn('game_player_id', $roleIds);
}
$items = $spendQuery->groupBy('game_player_id')
->get(['game_player_id', DB::raw('sum(pay_amount) amount')])
->pluck('amount', 'game_player_id')
->toArray();
$simulateQuery = SimulateSpend::where('base_game_id', $baseGame->id)
->whereBetween('review_time', $timeRange)
->where('status', 1);
if (is_array($roleIds)) {
$simulateQuery->whereIn('role_id', $roleIds);
}
$simulateItems = $simulateQuery->groupBy('role_id') ->get(['role_id', DB::raw('sum(amount) amount')]);
foreach ($simulateItems as $simulateItem) {
if (isset($items[$simulateItem->role_id])) {
$items[$simulateItem->role_id] += $simulateItem->amount;
} else {
$items[$simulateItem->role_id] = $simulateItem->amount;
}
}
return $items;
}
/**
* 月卡福利
*/
public function generateDaily($baseGame, $date)
{
$gifts = RebateGift::where('type', 'B')->where('base_game_id', $baseGame->id)->orderBy('amount', 'asc')->get();
if (count($gifts) == 0) {
return;
}
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
$timeRange = [strtotime($date . ' 00:00:00'), strtotime($date . ' 23:59:59')];
$items = Spend::where('pay_status', 1)
->whereIn('game_id', $gameIds)
->whereBetween('pay_time', $timeRange)
->groupBy('game_player_id')
->get(['game_player_id', DB::raw('sum(pay_amount) amount')])
->pluck('amount', 'game_player_id')
->toArray();
$simulateItems = SimulateSpend::where('base_game_id', $baseGame->id)
->whereBetween('review_time', $timeRange)
->where('status', 1)
->groupBy('role_id')
->get(['role_id', DB::raw('sum(amount) amount')]);
foreach ($simulateItems as $simulateItem) {
if (isset($items[$simulateItem->role_id])) {
$items[$simulateItem->role_id] += $simulateItem->amount;
} else {
$items[$simulateItem->role_id] = $simulateItem->amount;
}
}
$roleIds = array_keys($items);
$existQuery = RebateOrder::where('type', 'B')->where('base_game_id', $baseGame->id)->whereIn('role_id', $roleIds);
$config = $this->getBaseGameConfig($baseGame);
if ($config['is_daily_repeat']) {
$existQuery->where('award_date', $date);
} else {
$tomorrow = date('Y-m-d', strtotime($date) + 24 * 3600);
$existQuery->where('award_started_at', '<=', $tomorrow)->where('award_ended_at', '>=', $tomorrow);
}
$existItems = $existQuery->get(['role_id', 'gift_key'])->keyBy(function($item) {
return $item->role_id . '-' . $item->gift_key;
});
$roles = $this->getRolesByRoleIds($baseGame, $roleIds);
$awardStartedAt = date('Y-m-d', strtotime($date) + 1 * 24 * 3600);
$awardEndedAt = date('Y-m-d', strtotime($date) + 30 * 24 * 3600);
$records = [];
foreach ($items as $roleId => $amount) {
$maxGift = null;
foreach ($gifts as $gift) {
if ($amount >= $gift->amount) {
$maxGift = $gift;
}
}
if (is_null($maxGift)) {
continue;
}
$orderKey = $roleId . '-' . $maxGift->gift_key;
if (empty($existItems[$orderKey])) {
$role = $roles[$roleId] ?? null;
$record = $this->getCommonRecord($baseGame, $role, $maxGift);
$record = array_merge($record, [
'pay_amount' => $amount,
'award_date' => $date,
'award_started_at' => $awardStartedAt,
'award_ended_at' => $awardEndedAt,
'order_number' => uniqid('total_').rand(100000, 999999)
]);
$records[] = $record;
}
}
RebateOrder::insert($records);
}
/**
* 累充福利生成
*/
public function generateAccumulative($baseGame, $timeRange)
{
$gifts = RebateGift::where('type', 'C')
->where('base_game_id', $baseGame->id)
->orderBy('amount', 'asc')
->get();
if (count($gifts) == 0) {
return;
}
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
$roleIds = Spend::where('pay_status', 1)
->whereIn('game_id', $gameIds)
->whereBetween('pay_time', $timeRange)
->get([DB::raw('DISTINCT game_player_id')])
->pluck('game_player_id')
->toArray();
$simulateRoleIds = SimulateSpend::where('base_game_id', $baseGame->id)
->whereBetween('review_time', $timeRange)
->where('status', 1)
->get([DB::raw('DISTINCT role_id')])
->pluck('role_id')
->toArray();
$roleIds = array_unique(array_merge($roleIds, $simulateRoleIds));
$existItems = RebateOrder::whereIn('role_id', $roleIds)
->where('type', 'C')
->where('base_game_id', $baseGame->id)
->get(['gift_key', 'role_id'])
->keyBy(function($item) {
return $item->role_id . '-' . $item->gift_key;
});
$items = Spend::where('pay_status', 1)
->whereIn('game_id', $gameIds)
->whereIn('game_player_id', $roleIds)
->groupBy('game_player_id')
->get(['game_player_id', DB::raw('sum(pay_amount) amount')])
->pluck('amount', 'game_player_id')
->toArray();
$simulateItems = SimulateSpend::where('base_game_id', $baseGame->id)
->where('status', 1)
->whereIn('role_id', $roleIds)
->groupBy('role_id')
->get(['role_id', DB::raw('sum(amount) amount')]);
foreach ($simulateItems as $simulateItem) {
if (isset($items[$simulateItem->role_id])) {
$items[$simulateItem->role_id] += $simulateItem->amount;
} else {
$items[$simulateItem->role_id] = $simulateItem->amount;
}
}
$roles = $this->getRolesByRoleIds($baseGame, array_keys($items));
$records = [];
foreach ($items as $roleId => $amount) {
foreach ($gifts as $gift) {
if ($amount >= $gift->amount) {
$orderKey = $roleId . '-' . $gift->gift_key;
if (empty($existItems[$orderKey])) {
$role = $roles[$roleId] ?? null;
$record = $this->getCommonRecord($baseGame, $role, $gift);
$record = array_merge($record, [
'pay_amount' => $amount,
'order_number' => uniqid('total_').rand(100000, 999999)
]);
$records[] = $record;
}
}
}
}
RebateOrder::insert($records);
}
/**
* 首充福利生成
* (注意:优化处理,没领过首充礼包的都算首充)
*/
public function generateFirstPay($baseGame, $timeRange)
{
$gifts = RebateGift::where('type', 'D')->where('base_game_id', $baseGame->id)->get();
if (count($gifts) == 0) {
return;
}
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
$items = Spend::where('pay_status', 1)
->whereIn('game_id', $gameIds)
->whereBetween('pay_time', $timeRange)
->orderBy('pay_time', 'asc')
->get(['game_player_id', 'pay_amount', 'pay_order_number'])
->toArray();
$simulateItems = SimulateSpend::where('base_game_id', $baseGame->id)
->whereBetween('review_time', $timeRange)
->where('status', 1)
->get([
DB::raw('role_id as game_player_id'),
DB::raw('amount as pay_amount'),
DB::raw('order_no as pay_order_number')
])
->toArray();
$items = array_merge($items, $simulateItems);
$roleIds = array_column($items, 'game_player_id');
$existItems = RebateOrder::whereIn('role_id', $roleIds)
->where('type', 'D')
->where('base_game_id', $baseGame->id)
->get(['gift_key', 'role_id'])
->keyBy(function($item) {
return $item->role_id . '-' . $item->gift_key;
});
$roles = $this->getRolesByRoleIds($baseGame, $roleIds);
$records = [];
$newOrderKeys = [];
foreach ($items as $item) {
foreach ($gifts as $gift) {
if ($item['pay_amount'] >= $gift->amount) {
$orderKey = $item['game_player_id'] . '-' . $gift->gift_key;
if (empty($existItems[$orderKey]) && empty($newOrderKeys[$orderKey])) {
$role = $roles[$item['game_player_id']] ?? null;
$newOrderKeys[$orderKey] = 1;
$record = $this->getCommonRecord($baseGame, $role, $gift);
$record = array_merge($record, [
'pay_amount' => $item['pay_amount'],
'order_number' => $item['pay_order_number'],
]);
$records[] = $record;
}
}
}
}
RebateOrder::insert($records);
}
/**
* 单日累充福利生成
*/
public function generateDayAccumulative($baseGame, $date)
{
$gifts = RebateGift::where('type', 'E')->where('base_game_id', $baseGame->id)->orderBy('amount', 'asc')->get();
if (count($gifts) == 0) {
return;
}
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
$timeRange = [strtotime($date . ' 00:00:00'), strtotime($date . ' 23:59:59')];
$items = Spend::where('pay_status', 1)
->whereIn('game_id', $gameIds)
->whereBetween('pay_time', $timeRange)
->groupBy('game_player_id')
->get(['game_player_id', DB::raw('sum(pay_amount) amount')])
->pluck('amount', 'game_player_id')
->toArray();
$simulateItems = SimulateSpend::where('base_game_id', $baseGame->id)
->whereBetween('review_time', $timeRange)
->where('status', 1)
->groupBy('role_id')
->get(['role_id', DB::raw('sum(amount) amount')]);
foreach ($simulateItems as $simulateItem) {
if (isset($items[$simulateItem->role_id])) {
$items[$simulateItem->role_id] += $simulateItem->amount;
} else {
$items[$simulateItem->role_id] = $simulateItem->amount;
}
}
$roleIds = array_keys($items);
$existItems = RebateOrder::whereIn('role_id', $roleIds)
->where('type', 'E')
->where('base_game_id', $baseGame->id)
->where('award_date', $date)
->get(['gift_key', 'role_id'])
->keyBy(function($item) {
return $item->role_id . '-' . $item->gift_key;
});
$roles = $this->getRolesByRoleIds($baseGame, $roleIds);
$records = [];
foreach ($items as $roleId => $amount) {
foreach ($gifts as $gift) {
if ($amount >= $gift->amount) {
$orderKey = $roleId . '-' . $gift->gift_key;
if (empty($existItems[$orderKey])) {
$role = $roles[$roleId] ?? null;
$record = $this->getCommonRecord($baseGame, $role, $gift);
$record = array_merge($record, [
'award_date' => $date,
'pay_amount' => $amount,
'order_number' => uniqid('total_').rand(100000, 999999)
]);
$records[] = $record;
}
}
}
}
RebateOrder::insert($records);
}
/**
* 周卡福利(聚宝周卡)
* 目前仅适用于玄灵契约(无普遍适用性)
*/
public function generateWeekly($baseGame, $timeRange)
{
$gifts = RebateGift::where('type', 'F')->where('base_game_id', $baseGame->id)->orderBy('amount', 'asc')->get();
if (count($gifts) == 0) {
return;
}
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
$date = date('Y-m-d', $timeRange[0]);
$dateRange = [strtotime($date . ' 00:00:00'), strtotime($date . ' 23:59:59')];
$items = [];
$roleIds = [];
if (in_array($baseGame->id, [75, 79, 81])) {
$roleIds = Spend::where('pay_status', 1)
->whereIn('game_id', $gameIds)
->whereBetween('pay_time', $timeRange)
->where('extend', 'like', '%|123|%') // 玄灵契约聚宝盆活动标识
->get([DB::raw('DISTINCT game_player_id')])
->pluck('game_player_id')
->toArray();
$items = Spend::where('pay_status', 1)
->whereIn('game_id', $gameIds)
->whereIn('game_player_id', $roleIds)
->whereBetween('pay_time', $dateRange)
->where('extend', 'like', '%|123|%') // 玄灵契约聚宝盆活动标识
->groupBy('game_player_id')
->get(['game_player_id', DB::raw('sum(pay_amount) amount')])
->pluck('amount', 'game_player_id')
->toArray();
} else {
$roleIds = Spend::where('pay_status', 1)
->whereIn('game_id', $gameIds)
->whereBetween('pay_time', $timeRange)
->get([DB::raw('DISTINCT game_player_id')])
->pluck('game_player_id')
->toArray();
$items = $this->getPayAmountGroupByRole($baseGame, $dateRange, $roleIds);
}
if (false) {
$giftExistItems = RebateOrder::where('type', 'F')
->where('base_game_id', $baseGame->id)
->whereIn('role_id', $roleIds)
->get(['role_id'])
->keyBy('role_id');
}
$existItems = RebateOrder::where('type', 'F')
->where('base_game_id', $baseGame->id)
->whereIn('role_id', $roleIds)
->where('award_started_at', '<=', $date)
->where('award_ended_at', '>=', $date)
->get(['role_id'])
->keyBy('role_id');
$roles = $this->getRolesByRoleIds($baseGame, $roleIds);
// 当天开始发放
$awardStartedAt = date('Y-m-d', strtotime($date) + 0 * 24 * 3600);
$awardEndedAt = date('Y-m-d', strtotime($date) + 6 * 24 * 3600);
$records = [];
foreach ($items as $roleId => $amount) {
$maxGift = null;
foreach ($gifts as $gift) {
if ($amount >= $gift->amount) {
$maxGift = $gift;
}
}
if ($maxGift && empty($existItems[$roleId])) {
$role = $roles[$roleId] ?? null;
$record = $this->getCommonRecord($baseGame, $role, $maxGift);
$record = array_merge($record, [
'pay_amount' => $amount,
'award_date' => $date,
'award_started_at' => $awardStartedAt,
'award_ended_at' => $awardEndedAt,
'order_number' => uniqid('total_').rand(100000, 999999)
]);
$records[] = $record;
}
}
RebateOrder::insert($records);
}
/**
* 首次进游(每个角色一次)
*/
public function generateNewRole($baseGame, $timeRange)
{
$gifts = RebateGift::where('type', 'G')->where('base_game_id', $baseGame->id)->get();
if (count($gifts) == 0) {
return;
}
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
$roles = PlayerRole::whereIn('game_id', $gameIds)
->whereBetween('create_time', $timeRange)
->get(['user_id', 'role_name', 'role_id', 'server_id', 'server_name', 'user_account']);
$roleIds = $roles->pluck('role_id')->toArray();
$existItems = RebateOrder::whereIn('role_id', $roleIds)
->where('type', 'G')
->where('base_game_id', $baseGame->id)
->get(['role_id'])
->keyBy('role_id');
$gift = $gifts->first();
$records = [];
foreach ($roles as $role) {
if ($gift && empty($existItems[$role->role_id])) {
$record = $this->getCommonRecord($baseGame, $role, $gift);
$records[] = $record;
}
}
RebateOrder::insert($records);
}
/**
* 签到福利发放(每个角色如果当天有登录发放)
*/
public function generateDailySign($baseGame, $timeRange)
{
$gifts = RebateGift::where('type', 'H')->where('base_game_id', $baseGame->id)->get();
if (count($gifts) == 0) {
return;
}
$date = date('Y-m-d', $timeRange[0]);
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
$roles = PlayerRole::whereIn('game_id', $gameIds)
->whereBetween('play_time', $timeRange)
->get(['user_id', 'role_name', 'role_id', 'server_id', 'server_name', 'user_account', 'play_time', 'create_time']);
$roleIds = $roles->pluck('role_id')->toArray();
$maxItems = [];
if (!in_array($baseGame->id, [84])) {
$maxItems = RebateOrder::whereIn('role_id', $roleIds)
->where('type', 'H')
->where('base_game_id', $baseGame->id)
->groupBy('role_id')
->havingRaw('count(*) >= ?', [3])
->get(['role_id'])
->keyBy('role_id');
}
$existItems = RebateOrder::whereIn('role_id', $roleIds)
->where('type', 'H')
->where('award_date', $date)
->where('base_game_id', $baseGame->id)
->get(['role_id'])
->keyBy('role_id');
$gift = $gifts->first();
$records = [];
foreach ($roles as $role) {
if (date('Ymd', $role['play_time']) <= date('Ymd', $role['create_time'])) {
continue;
}
if ($gift && empty($existItems[$role->role_id]) && empty($maxItems[$role->role_id])) {
$record = $this->getCommonRecord($baseGame, $role, $gift);
$record = array_merge($record, [
'award_date' => $date,
]);
$records[] = $record;
}
}
RebateOrder::insert($records);
}
/**
* 开服七天活动
*/
public function generateOpenSevenDay($baseGame, $timeRange)
{
$gifts = RebateGift::where('type', 'K')->where('base_game_id', $baseGame->id)->get()->keyBy('gift_key');
if (count($gifts) == 0) {
return;
}
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
$serverStartedAt = strtotime(date('Y-m-d 00:00:00', $timeRange[0] - 7*24*3600));
$serverEndedAt = strtotime(date('Y-m-d 23:59:59', $timeRange[0]));
$servers = Server::whereIn('game_id', $gameIds)->whereBetween('start_time', [$serverStartedAt, $serverEndedAt])->get(['id', 'server_id', 'start_time']);
$servers = $servers->keyBy('server_id');
$serverIds = $servers->pluck('server_id')->toArray();
$orders = $this->getOrders($baseGame, $timeRange, $serverIds);
$orderNumbers = array_column($orders, 'pay_order_number');
$existItems = RebateOrder::whereIn('order_number', $orderNumbers)
->where('type', 'K')
->where('base_game_id', $baseGame->id)
->get(['order_number'])
->keyBy(function($item) {
return $item->order_number;
});
$roles = $this->getRolesByRoleIds($baseGame, array_column($orders, 'game_player_id'));
$records = [];
foreach ($orders as $order) {
$amount = intval($order['pay_amount']);
$server = $servers[$order['server_id']];
if (is_null($server)) {
continue;
}
$num = 0;
if ($amount == 328) {
$num = 1;
} elseif ($amount == 648) {
$num = 2;
} elseif ($amount == 1000) {
$num = 3;
}
$day = (
strtotime(date('Y-m-d 00:00:00', $order['pay_time'])) -
strtotime(date('Y-m-d 00:00:00', $server->start_time))
)/(24*3600) + 1;
$giftKey = 'K-'.$day;
$gift = $gifts[$giftKey] ?? null;
if ($gift && empty($existItems[$order['pay_order_number']])) {
$role = $roles[$order['game_player_id']] ?? null;
$record = $this->getCommonRecord($baseGame, $role, $gift);
$record = array_merge($record, [
'pay_amount' => $order['pay_amount'],
'order_number' => $order['pay_order_number'],
]);
for ($i=0; $i<$num; $i++) {
$records[] = $record;
}
}
}
RebateOrder::insert($records);
}
private function getRolesByRoleIds($baseGame, $roleIds)
{
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
return PlayerRole::whereIn('game_id', $gameIds)
->whereIn('role_id', $roleIds)
->orderBy('role_level', 'desc')
->get(['user_id', 'role_name', 'role_id', 'server_id', 'server_name', 'user_account'])
->keyBy('role_id');
}
/* private function getGameRolesPayAmount($baseGame, $roleIds)
{
$gameIds = [$baseGame->android_game_id, $baseGame->ios_game_id];
return Spend::where('pay_status', 1)
->whereIn('game_id', $gameIds)
->whereIn('game_player_id', $roleIds)
->groupBy('game_player_id')
->get(['game_player_id', DB::raw('sum(pay_amount) amount')]);
} */
private function getCommonRecord($baseGame, $role, $gift)
{
$record = [
'base_game_id' => $baseGame->id,
'base_game_name' => $baseGame->name,
'user_id' => $role ? $role->user_id : '',
'user_account' => $role ? $role->user_account : '',
'server_id' => $role ? $role->server_id : '',
'server_name' => $role ? $role->server_name : '',
'role_name' => $role ? $role->role_name : '',
'role_id' => $role ? $role->role_id : '',
'type' => $gift->type,
'amount' => $gift->amount,
'gift_key' => $gift->gift_key,
'gift_content' => $gift->gift_content,
'create_time' => time(),
'creator_username' => '系统',
];
if (self::AUTO_REVIEW) {
$record = $this->addReviewParams($record);
}
return $record;
}
private function addReviewParams($record)
{
$record['review_type'] = 0;
$record['reviewer_id'] = 0;
$record['reviewer_username'] = '系统';
$record['review_status'] = 1;
$record['review_time'] = time();
return $record;
}
public function initRebateGifts70()
{
$aList = [
['gift_key' => 'A-328', 'amount' => 328, 'gifts' => [['id' => 161, 'num' => 1]], 'game_currency' => 328, 'gift_content' => '32801元宝|天仙套装宝箱*20|极品熔炼石*5|符咒令*10|秘境卷轴*5'],
['gift_key' => 'A-648', 'amount' => 648, 'gifts' => [['id' => 163, 'num' => 1]], 'game_currency' => 648, 'gift_content' => '64801元宝|天神套装宝箱*20|百变橙色符咒Ⅰ*1|红色符咒精华宝箱*5|3倍经验药水*1'],
['gift_key' => 'A-1000', 'amount' => 1000, 'gifts' => [['id' => 164, 'num' => 1]], 'game_currency' => 1000, 'gift_content' => '100001元宝|神王传承宝箱*2|红色星图宝箱*3|百变二转技能书*3|二级宝石礼包*10|兽神丹*100'],
['gift_key' => 'A-2000', 'amount' => 2000, 'gifts' => [['id' => 165, 'num' => 1]], 'game_currency' => 2000, 'gift_content' => '200001元宝|百变红色符咒Ⅰ*1|极致熔炼石*5|红色符咒精华宝箱*10|橙色图鉴自选礼包*1|3倍经验药水*2'],
['gift_key' => 'A-3000', 'amount' => 3000, 'gifts' => [['id' => 166, 'num' => 1]], 'game_currency' => 3000, 'gift_content' => '300001元宝|萌娃·魔法少女*1|爱情精华*30|百变三转技能书*3|红3星星图宝箱*1|神王传承宝箱*4'],
['gift_key' => 'A-5000', 'amount' => 5000, 'gifts' => [['id' => 167, 'num' => 1]], 'game_currency' => 5000, 'gift_content' => '500001元宝|流光·绿茵星光*1|流光淬魂晶*5|粉色星图宝箱*1|诗经*34|橙色图鉴自选礼包*2|百变圣石*1'],
['gift_key' => 'A-10000', 'amount' => 10000, 'gifts' => [['id' => 168, 'num' => 1]], 'game_currency' => 10000, 'gift_content' => '1000001元宝|神兵·泰阿*1|神兵麒麟天玉*5|粉色神王自选宝箱*2|风火轮·红*1|红色图鉴自选礼包*1|百变四转技能书*4'],
['gift_key' => 'A-20000', 'amount' => 20000, 'gifts' => [['id' => 169, 'num' => 1]], 'game_currency' => 20000, 'gift_content' => '2000001元宝|仙翼·幻雪神羽*1|仙翼神凰仙羽*10|金五星自选礼包*1|混天绫·红*1|红色图鉴自选礼包*2|百变红色符咒Ⅲ*1'],
];
$bList = [
['gift_key' => 'B-328', 'amount' => 328, 'gifts' => [['id' => 217, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '1280元宝'],
['gift_key' => 'B-648', 'amount' => 648, 'gifts' => [['id' => 218, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '3280元宝'],
['gift_key' => 'B-1000', 'amount' => 1000, 'gifts' => [['id' => 219, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '6480元宝'],
['gift_key' => 'B-2000', 'amount' => 2000, 'gifts' => [['id' => 220, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '14800元宝'],
// ['gift_key' => 'B-3000', 'amount' => 3000, 'gifts' => ['id' => 0, 'num' => 0], 'game_currency' => 20000, 'gift_content' => '20000元宝'],
];
$cList = [
['gift_key' => 'C-100', 'amount' => 100, 'gifts' => [['id' => 170, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '气泡·冒泡*1|装备寻宝令*10|灵兽丹*20|秘境卷轴*2|2倍经验药水*1'],
['gift_key' => 'C-200', 'amount' => 200, 'gifts' => [['id' => 171, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '相框·气泡*1|符咒令*30|仙灵果*40|三级红宝石*2|三级蓝宝石*2'],
['gift_key' => 'C-350', 'amount' => 350, 'gifts' => [['id' => 172, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '百变橙色符咒Ⅰ*1|红色符咒精华礼盒*5|人品花撵丹*12|地品花撵丹*12|3倍经验药水*1'],
['gift_key' => 'C-500', 'amount' => 500, 'gifts' => [['id' => 173, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '时装·暗香盈袖*1|表情·吓死了*1|人品道果丹*16|地品道果丹*16|四级红宝石*2|四级蓝宝石*2'],
['gift_key' => 'C-800', 'amount' => 800, 'gifts' => [['id' => 174, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '神兵·桃花暗凋刃*1|萤草*15|人品披风丹*22|地品披风丹*22|太虚秘卷*1|太初秘卷*1'],
['gift_key' => 'C-1000', 'amount' => 1000, 'gifts' => [['id' => 175, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '齐天大圣灵珠*100|坐骑·斩仙葫芦*1|人品阵法丹*26|地品阵法丹*26|大圣之刃*1|大圣战盾*1|高级坐骑技能礼盒*5'],
['gift_key' => 'C-2000', 'amount' => 2000, 'gifts' => [['id' => 176, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '仙翼·如意吉祥*1|万古仙翼晶石*10|酒剑仙图鉴激活卡*2|人品宝甲丹*30|地品宝甲丹*30|五级红宝石*2|五级蓝宝石*2'],
['gift_key' => 'C-3000', 'amount' => 3000, 'gifts' => [['id' => 177, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '剑阵·阴阳轮回剑*2|金轮法王图鉴激活卡*3|御雷真诀秘典*2|百变橙色符咒Ⅱ*1|天仙套装宝箱*40|天仙饰品宝箱*20|精致熔炼石*20'],
['gift_key' => 'C-5000', 'amount' => 5000, 'gifts' => [['id' => 178, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '岁岁平安套装|图鉴·春*3|气泡·欢乐元宵*1|相框·欢乐元宵*1|红色星图宝箱*2|四级雷属性石*2|四级雷穿透石*2'],
['gift_key' => 'C-7000', 'amount' => 7000, 'gifts' => [['id' => 179, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '流光·闪烁星光*2|图鉴·夏*3|流光塑形晶*50|流光赋灵晶*50|天神套装宝箱*40|天神饰品宝箱*20|六级红宝石*2|六级蓝宝石*2'],
['gift_key' => 'C-10000', 'amount' => 10000, 'gifts' => [['id' => 180, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '腾蛇灵珠*100|金刚不坏秘典*2|红色星图宝箱*4|极致熔炼石*10|百变神石*6|混沌神石*6|腾蛇之刃*1|腾蛇战盔*1|腾蛇木龙魂*1'],
['gift_key' => 'C-15000', 'amount' => 15000, 'gifts' => [['id' => 181, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '法器·凤天皇*2|图鉴·秋*3|怜雀羽*40|寒霜羽*40|百变红2星器灵*4|器灵强化礼包*20|百变红色符咒*2|红符咒精华宝箱*20|腾蛇毒龙魂*1'],
['gift_key' => 'C-20000', 'amount' => 20000, 'gifts' => [['id' => 182, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '仙剑逍遥套装|万古神兵灵石*50|万古法宝灵晶*50|千手如来秘典*2|红2星星图宝箱*8|神王传承宝箱*4|五级土属性石*2|五级土穿透石*2|烈阳晶*99'],
['gift_key' => 'C-25000', 'amount' => 25000, 'gifts' => [['id' => 183, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '萌娃·灵月姬*4|金耀道人碎片*200|图鉴·冬*4|灵月仙诀*10|天阶修炼石*200|太极神玉·镯*3|太极神玉·戒*3|七级红宝石*2|七级蓝宝石*2'],
['gift_key' => 'C-30000', 'amount' => 30000, 'gifts' => [['id' => 184, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '玄武灵珠*200|坐骑·洞庭花月*1|4-6星坐骑宝箱*4|斗转星移秘典*2|粉色星图宝箱*2|粉色神王自选宝箱*2|神王淬炼灵石*10|玄武之刃*1|玄武王铠*1'],
['gift_key' => 'C-40000', 'amount' => 40000, 'gifts' => [['id' => 185, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '仙童·桃花仙*2|4-6星仙童宝箱*8|冰凰玉璧*34|炎凤玉璧*34|粉四星自选礼包*4|完美熔炼石*10|六级火属性石*3|六级火穿透石*3|六级火防御石*3'],
['gift_key' => 'C-50000', 'amount' => 50000, 'gifts' => [['id' => 186, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '龙化九天套装|流光·醉梦迷乡*1|天品宝甲仙丹*30|天品剑阵仙丹*30|金蚕丝甲珍篇*2|红色图鉴自选礼包Ⅰ*2|百变红色符咒Ⅱ*2|八级红宝石*2|八级蓝宝石*2'],
['gift_key' => 'C-70000', 'amount' => 70000, 'gifts' => [['id' => 187, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '阵法·万鬼微尘阵*2|10阶神装项链*1|10阶神装玉佩*1|天品阵法仙丹*30|粉色星图宝箱*4|粉色神王自选宝箱*4|七级水属性石*4|七级雷穿透石*4|七级土防御石*4'],
['gift_key' => 'C-90000', 'amount' => 90000, 'gifts' => [['id' => 188, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '披风·红尘大氅*3|魔天龙皇碎片*100|黄龙饶日玉璧*34|赤龙掩日玉璧*34|圆月潮汐珍篇*2|粉四星自选礼包*6|天品披风仙丹*30|百变神石*6|百变圣石*2'],
['gift_key' => 'C-120000', 'amount' => 120000, 'gifts' => [['id' => 189, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '法宝·晓春灵蛙*5|灭世使者碎片*100|瀚海玉璧*34|生机玉璧*34|元素护盾奥义*1|金五星自选礼包*2|法宝火凤灵珠*30|四象灵石*6|百变圣石*4'],
['gift_key' => 'C-150000', 'amount' => 150000, 'gifts' => [['id' => 190, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '鎏璃灵珠*100|九天玄女碎片*100|元素窃取奥义*1|粉色神王自选宝箱*8|八级火属性石*4|八级火穿透石*4|无极圣玉·镯*3|鎏璃之刃*1|鎏璃利爪*1'],
['gift_key' => 'C-180000', 'amount' => 180000, 'gifts' => [['id' => 191, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '坐骑·觅心宝座*5|披风·桃花仙氅*5|红色图鉴自选礼包Ⅰ*3|完美熔炼石*20|元素之子奥义*1|九级红宝石*2|九级蓝宝石*2|八级水防御石*5|无极圣玉·戒*3'],
['gift_key' => 'C-200000', 'amount' => 200000, 'gifts' => [['id' => 192, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '蚩尤碎片*200|元素衰竭奥义*1|粉色星图宝箱*8|金五星自选礼包*4|幻彩蝶*34|蓝蝶花*34|九级雷属性石*6|九级风穿透石*6|九级火防御石*6'],
];
$this->saveRebateGifts(70, 'A', $aList);
$this->saveRebateGifts(70, 'B', $bList);
$this->saveRebateGifts(70, 'C', $cList);
}
public function initRebateGifts73()
{
$aList = [
['gift_key' => 'A-10', 'amount' => 10, 'gifts' => [['id' => 1782, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '10000返利元宝'],
['gift_key' => 'A-50', 'amount' => 50, 'gifts' => [['id' => 1781, 'num' => 5]], 'game_currency' => 25000, 'gift_content' => '25000返利元宝|25000充值元宝'],
['gift_key' => 'A-100', 'amount' => 100, 'gifts' => [['id' => 1783, 'num' => 1]], 'game_currency' => 50000, 'gift_content' => '50000返利元宝|50000充值元宝'],
['gift_key' => 'A-300', 'amount' => 300, 'gifts' => [['id' => 1783, 'num' => 3]], 'game_currency' => 150000, 'gift_content' => '150000返利元宝|150000充值元宝'],
['gift_key' => 'A-500', 'amount' => 500, 'gifts' => [['id' => 1783, 'num' => 5]], 'game_currency' => 250000, 'gift_content' => '250000返利元宝|250000充值元宝'],
['gift_key' => 'A-1000', 'amount' => 1000, 'gifts' => [['id' => 1784, 'num' => 5]], 'game_currency' => 500000, 'gift_content' => '500000返利元宝|500000充值元宝'],
['gift_key' => 'A-3000', 'amount' => 3000, 'gifts' => [['id' => 1784, 'num' => 15]], 'game_currency' => 1500000, 'gift_content' => '1500000返利元宝|1500000充值元宝'],
['gift_key' => 'A-5000', 'amount' => 5000, 'gifts' => [['id' => 1784, 'num' => 25]], 'game_currency' => 2500000, 'gift_content' => '2500000返利元宝|2500000充值元宝'],
['gift_key' => 'A-10000', 'amount' => 10000, 'gifts' => [['id' => 1784, 'num' => 50]], 'game_currency' => 5000000, 'gift_content' => '5000000返利元宝|5000000充值元宝'],
['gift_key' => 'A-20000', 'amount' => 20000, 'gifts' => [['id' => 1784, 'num' => 100]], 'game_currency' => 10000000, 'gift_content' => '10000000返利元宝|10000000充值元宝'],
];
$this->saveRebateGifts(73, 'A', $aList);
}
public function initRebateGifts75()
{
$aList = [
['gift_key' => 'A-98', 'amount' => 98, 'gifts' => [['id' => 256, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*30|[史诗]头衔令牌*3| 守护培养丹(小)*30'],
['gift_key' => 'A-128', 'amount' => 128, 'gifts' => [['id' => 257, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*50|[传说]头衔令牌*1|中级攻击神兵*10|灵气丹*2000'],
['gift_key' => 'A-198', 'amount' => 198, 'gifts' => [['id' => 258, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*50|高级兽魂丹自选箱*3|中级狂暴神兵*10|宠物升级丹*100'],
['gift_key' => 'A-328', 'amount' => 328, 'gifts' => [['id' => 259, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*100|【图鉴】十二星座自选*1|狂暴天赋卷轴*50|守护培养丹(中)*30'],
['gift_key' => 'A-648', 'amount' => 648, 'gifts' => [['id' => 260, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*200|进阶资质丹任选宝箱*3|中级断罪圣器石*30|灵气丹*10000'],
['gift_key' => 'A-1000', 'amount' => 1000, 'gifts' => [['id' => 261, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*300|阵眼·阴阳鱼*5|妖师元神*50|中级元素圣器石*40|守护培养丹(中)*50'],
['gift_key' => 'A-2000', 'amount' => 2000, 'gifts' => [['id' => 262, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*600|【唯一】头衔令牌*3|至尊属性兽魂*1 +高级神兵自选*50|灵气丹*50000'],
['gift_key' => 'A-5000', 'amount' => 5000, 'gifts' => [['id' => 263, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*1000|至尊属性兽魂*2|圣品图鉴任选*1|高级神兵自选*50|高级圣器材料任选*20|守护培养丹(大)*50'],
['gift_key' => 'A-10000', 'amount' => 10000, 'gifts' => [['id' => 264, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*2000|永圣装碎片礼盒*1|至尊属性兽魂*5|圣品图鉴任选*1|天女元神*40|高级神兵自选*100|高级圣器材料任选*50|守护培养丹(大)*50|灵气丹*100000'],
];
$bList = [
['gift_key' => 'B-648', 'amount' => 648, 'gifts' => [['id' => 254, 'num' => 1], ['id' => 285, 'num' => 1, 'once' => true]], 'game_currency' => 0, 'gift_content' => '2000元充值卡*1首次|1000充值卡*1'],
['gift_key' => 'B-2000', 'amount' => 2000, 'gifts' => [['id' => 255, 'num' => 1], ['id' => 286, 'num' => 1, 'once' => true]], 'game_currency' => 0, 'gift_content' => '5000元充值卡*1首次|2000充值卡*1'],
];
$cList = [
['gift_key' => 'C-100', 'amount' => 100, 'gifts' => [['id' => 272, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'R级相框·妖精物语|【史诗】头衔令牌*3|注灵石*10|进阶丹任选*50'],
['gift_key' => 'C-200', 'amount' => 200, 'gifts' => [['id' => 273, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'R级气泡·夏日风情|八阵图秘盒*5|高级强化宝石*10|进阶丹任选*80'],
['gift_key' => 'C-500', 'amount' => 500, 'gifts' => [['id' => 274, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SR幻武·缤纷夏日|【图鉴】十二星座自选*1|注灵石*20|进阶丹任选*100'],
['gift_key' => 'C-1000', 'amount' => 1000, 'gifts' => [['id' => 275, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSR神行·呆萌小鸭|幸运神石*1|进阶资质丹任选箱*3|四象之术|灵脉心经*1,宝石淬炼石*50|进阶丹任选*200'],
['gift_key' => 'C-3000', 'amount' => 3000, 'gifts' => [['id' => 276, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSR时装·梦回童乐*1|红色符文任选*2|双重符文任选*2|至尊减伤兽魂*1|灵脉心经*1|注灵石*100|进阶丹任选*500'],
['gift_key' => 'C-5000', 'amount' => 5000, 'gifts' => [['id' => 277, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSR幻武·梦幻卡通*1|红色核心符文【绝对闪避】|至尊伤害兽魂*1|【唯一】头衔令牌*1|注灵石*100|进阶丹任选*500'],
['gift_key' => 'C-8000', 'amount' => 8000, 'gifts' => [['id' => 278, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '妖灵·天女元神*40|SSSR坐骑·奇趣飞燕|红色核心符文【致命一击】|至尊属性兽魂*1|注灵石*150|进阶丹任选*800'],
['gift_key' => 'C-12000', 'amount' => 12000, 'gifts' => [['id' => 279, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSR翅膀·风车王国*1|3-4转SR守护进阶材料自选*1|圣器图鉴任选*1|永恒圣装碎片任选*15|辉煌宝石lv7*2|红色坐骑装备任选箱*1|神级淬炼石*10'],
['gift_key' => 'C-18000', 'amount' => 18000, 'gifts' => [['id' => 280, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSR时装·午夜狂欢*1|圣物·天雷欲动纹*1|圣器图鉴任选*1|永恒圣装碎片任选*20|400活跃度药水*1|红色灵翼装备任选箱*1|觉醒水晶*10'],
['gift_key' => 'C-25000', 'amount' => 25000, 'gifts' => [['id' => 281, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSR坐骑·上古焰龙兽|【至尊圣物】·玲珑玄黄经|圣器图鉴任选*1|永恒圣装碎片任选*30|至尊属性兽魂*3|红色宠物装备任选箱*2|荣耀·天赐觉醒石*3'],
['gift_key' => 'C-35000', 'amount' => 35000, 'gifts' => [['id' => 282, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSS法宝·鲜血哀歌|SSSR相框·假面派对|圣器图鉴任选*2|永恒圣装碎片任选*40|至尊属性兽魂*3|法身新生石*2|【五转法身合成材料】琉璃火珠*3|红品洗炼神晶*10'],
['gift_key' => 'C-50000', 'amount' => 50000, 'gifts' => [['id' => 283, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSS法宝·鎏金镇魂|SSSSR气泡·真龙天子|圣器图鉴任选*2|永恒圣装碎片任选*60|3-5转核心自选箱*1|法身新生石*2|【五转法身100%合成材料】扶桑树枝*3|高级护盾突破材料*3.'],
];
$dList = [
['gift_key' => 'D-0', 'amount' => 0, 'gifts' => [['id' => 252, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SR【太初神剑】|装备探宝钥匙*10|100积分宝石'],
];
$eList = [
['gift_key' => 'E-500', 'amount' => 500, 'gifts' => [['id' => 265, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '暗裔魔灵*550|进阶资质丹任选箱*2|幸运神石*2'],
['gift_key' => 'E-1000', 'amount' => 1000, 'gifts' => [['id' => 266, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '春意盎然幻化套装|进阶资质丹任选箱*3精炼资质丹任选箱*1'],
['gift_key' => 'E-2000', 'amount' => 2000, 'gifts' => [['id' => 267, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '妖师元神*150|永结同心幻化套装|至尊属性兽魂*1+初级属性兽魂*5|SR守护进阶礼包*1+觉醒水晶*3'],
['gift_key' => 'E-3000', 'amount' => 3000, 'gifts' => [['id' => 268, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '清凉一夏幻化套装|至尊属性兽魂*1、进阶资质丹任选箱*5、金水菩提|红品坐骑进阶装备任选*1、天赐觉醒石*2、耀眼觉醒石*2'],
['gift_key' => 'E-5000', 'amount' => 5000, 'gifts' => [['id' => 269, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '仙风道骨幻化套装|永恒圣装任选1件|至尊属性兽魂*2、进阶资质丹任选箱*5、传世皇金*1|3转炫彩宝石lv7、宝石淬炼石*408、神级淬炼石*60'],
['gift_key' => 'E-10000', 'amount' => 10000, 'gifts' => [['id' => 270, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '仙灵元神*120|海枯石烂幻化套装|永恒圣装任选2件|至尊属性兽魂*5、水晶龙鳞*3|SSR守护进阶礼包*1、红品神行装备任选*1、红品法宝装备任选*1、荣耀·天赐觉醒石*3、荣耀·耀眼觉醒石*3'],
['gift_key' => 'E-20000', 'amount' => 20000, 'gifts' => [['id' => 271, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '命运之轮幻化套装|永恒圣装任选5件|至尊属性兽魂*10、水晶龙鳞*5、天神灵银*3'],
];
$fList = [
['gift_key' => 'F-227', 'amount' => 227, 'gifts' => [['id' => 253, 'num' => 1], ['id' => 284, 'num' => 1, 'once' => true]], 'game_currency' => 0, 'gift_content' => '648元充值卡*1首次|1000充值卡'],
];
$gList = [
['gift_key' => 'G-0', 'amount' => 0, 'gifts' => [['id' => 329, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '2000元充值卡*1'],
];
$hList = [
['gift_key' => 'H-0', 'amount' => 0, 'gifts' => [['id' => 330, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '2000元充值卡*1'],
];
$iList = [
['gift_key' => 'I-6', 'amount' => 6, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-8', 'amount' => 8, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-12', 'amount' => 12, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-18', 'amount' => 18, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-25', 'amount' => 25, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-30', 'amount' => 30, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-38', 'amount' => 38, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-50', 'amount' => 50, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-68', 'amount' => 68, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-88', 'amount' => 88, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-98', 'amount' => 98, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-128', 'amount' => 128, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-168', 'amount' => 168, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-198', 'amount' => 198, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-296', 'amount' => 296, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-328', 'amount' => 328, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-648', 'amount' => 648, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-1000', 'amount' => 1000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-2000', 'amount' => 2000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-5000', 'amount' => 5000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-10000', 'amount' => 10000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
];
$gameId = 75;
/* $this->saveRebateGifts($gameId, 'A', $aList);
$this->saveRebateGifts($gameId, 'B', $bList);
$this->saveRebateGifts($gameId, 'C', $cList);
$this->saveRebateGifts($gameId, 'D', $dList);
$this->saveRebateGifts($gameId, 'E', $eList);
$this->saveRebateGifts($gameId, 'F', $fList);
$this->saveRebateGifts($gameId, 'G', $gList);
$this->saveRebateGifts($gameId, 'H', $hList);
$this->saveRebateGifts($gameId, 'I', $iList); */
}
public function initRebateGifts79()
{
$gameId = 79;
RebateGift::where('type', 'C')->where('base_game_id', $gameId)->where('amount', '>=', 5000)->where('amount', '<=', 80000)->delete();
$cList = [
['gift_key' => 'C-5000', 'amount' => 5000, 'gifts' => [['id' => 66, 'num' => 1], ['id' => 71, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSR坐骑·奇趣飞燕*1|红色核心符文【致命一击】|至尊属性兽魂*1|大地之书*1|注灵石*150|高级神兵自选宝箱*100|法宝SSSSS魔·鲜血哀歌*1|【至尊】天雷欲动纹*1|混沌天书*1'],
['gift_key' => 'C-7000', 'amount' => 7000, 'gifts' => [['id' => 72, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '顶级妖灵·仙灵元神*40|3-5转SR守护进阶材料自选*1|至尊属性兽魂*1|辉煌宝石lv7*1|宝石淬炼石*500|神品淬炼石*100'],
['gift_key' => 'C-8000', 'amount' => 8000, 'gifts' => [['id' => 67, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '坐骑SSSSS魔·绝影绯狱*1|【至尊】玲珑玄黄经*1|大地宝典*1'],
['gift_key' => 'C-10000', 'amount' => 10000, 'gifts' => [['id' => 91, 'num' => 1], ['id' => 62, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '灵翼SSSSS魔·幻鸦黯羽*1|武器SSSSS[魔·吟龙]幻武宝箱自选*1|SSSSR翅膀·嗜血屠戮*1|守护觉醒自选|至尊属性兽魂*1|圣器图鉴任选*1|永恒圣装碎片任选*10|400活跃度药水*1|荣耀之纹 Lv.6*1'],
['gift_key' => 'C-20000', 'amount' => 20000, 'gifts' => [['id' => 74, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSR时装·午夜狂欢*1|圣物·天雷欲动纹*1|至尊属性兽魂*2|圣器图鉴任选*1|永恒圣装碎片任选*10|荣耀之纹 Lv.7*1|橙品守护装备任选箱*1 '],
['gift_key' => 'C-30000', 'amount' => 30000, 'gifts' => [['id' => 75, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSR坐骑·河洛之灵*1|[至尊]玲珑玄黄经*1|圣器图鉴任选*1|永恒圣装碎片任选*20|至尊属性兽魂*3|荣耀之纹 Lv.8*1|红品守护装备任选箱*1'],
['gift_key' => 'C-50000', 'amount' => 50000, 'gifts' => [['id' => 76, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSS武器·神·凤凰涅槃*1|SSSR相框·假面派对*1|圣器图鉴任选*2|永恒圣装碎片任选*30|至尊属性兽魂*3|荣耀之纹 Lv.9*1|【五转法身合成材料】琉璃火珠*3|红品洗炼神晶*10'],
['gift_key' => 'C-80000', 'amount' => 80000, 'gifts' => [['id' => 77, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSS法宝·神·鎏金镇魂*1|SSSSR气泡·真龙天子*1|圣器图鉴任选*2|永恒圣装碎片任选*40|3-5转核心自选箱*1|荣耀之纹 Lv.10*1|【五转法身100%合成材料】扶桑树枝*3|高级护盾突破材料*3'],
];
$this->saveRebateGifts($gameId, 'C', $cList);
}
public function initRebateGifts81()
{
$aList = [
['gift_key' => 'A-98', 'amount' => 98, 'gifts' => [['id' => 46, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*30|[史诗]头衔令牌*3| 守护培养丹(小)*30'],
['gift_key' => 'A-128', 'amount' => 128, 'gifts' => [['id' => 47, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*50|[传说]头衔令牌*1|中级攻击神兵*10|灵气丹*2000'],
['gift_key' => 'A-198', 'amount' => 198, 'gifts' => [['id' => 48, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*50|高级兽魂丹自选箱*3|中级狂暴神兵*10|宠物升级丹*100'],
['gift_key' => 'A-328', 'amount' => 328, 'gifts' => [['id' => 49, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*100|【图鉴】十二星座自选*1|狂暴天赋卷轴*50|守护培养丹(中)*30'],
['gift_key' => 'A-648', 'amount' => 648, 'gifts' => [['id' => 50, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*200|进阶资质丹任选宝箱*3|中级断罪圣器石*30|灵气丹*10000'],
['gift_key' => 'A-1000', 'amount' => 1000, 'gifts' => [['id' => 51, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*300|阵眼·阴阳鱼*5|妖师元神*50|中级元素圣器石*40|守护培养丹(中)*50'],
['gift_key' => 'A-2000', 'amount' => 2000, 'gifts' => [['id' => 52, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*600|【唯一】头衔令牌*3|至尊属性兽魂*1 +高级神兵自选*50|灵气丹*50000'],
['gift_key' => 'A-5000', 'amount' => 5000, 'gifts' => [['id' => 53, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*1000|至尊属性兽魂*2|圣品图鉴任选*1|高级神兵自选*50|高级圣器材料任选*20|守护培养丹(大)*50'],
['gift_key' => 'A-10000', 'amount' => 10000, 'gifts' => [['id' => 54, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装备探宝钥匙*2000|永圣装碎片礼盒*1|至尊属性兽魂*5|圣品图鉴任选*1|天女元神*40|高级神兵自选*100|高级圣器材料任选*50|守护培养丹(大)*50|灵气丹*100000'],
];
$bList = [
['gift_key' => 'B-648', 'amount' => 648, 'gifts' => [['id' => 44, 'num' => 1], ['id' => 41, 'num' => 1, 'once' => true]], 'game_currency' => 0, 'gift_content' => '2000元充值卡*1首次|648充值卡*2'],
['gift_key' => 'B-2000', 'amount' => 2000, 'gifts' => [['id' => 45, 'num' => 1], ['id' => 42, 'num' => 1, 'once' => true]], 'game_currency' => 0, 'gift_content' => '5000元充值卡*1首次|648充值卡*4'],
];
$cList = [
['gift_key' => 'C-100', 'amount' => 100, 'gifts' => [['id' => 63, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'R级相框·妖精物语|【史诗】头衔令牌*3|注灵石*10|初级神兵自选宝箱*10'],
['gift_key' => 'C-128', 'amount' => 128, 'gifts' => [['id' => 55, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '坐骑SSR千纸鹤*1'],
['gift_key' => 'C-198', 'amount' => 198, 'gifts' => [['id' => 56, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '神行外观SSR呆萌小鸭*1'],
['gift_key' => 'C-200', 'amount' => 200, 'gifts' => [['id' => 64, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'R级气泡·夏日风情|八阵图秘盒*3|高级强化宝石*10|初级神兵自选宝箱*20'],
['gift_key' => 'C-328', 'amount' => 328, 'gifts' => [['id' => 57, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '武器SSSR[童话]幻武宝箱自选*1|神·永恒之战盔*1'],
['gift_key' => 'C-500', 'amount' => 500, 'gifts' => [['id' => 65, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SR幻武·缤纷夏日|【图鉴】十二星座自选*1|注灵石*20|中级神兵自选宝箱*10'],
['gift_key' => 'C-648', 'amount' => 648, 'gifts' => [['id' => 58, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '时装SSSR[童乐]时装宝箱自选*1|神·永恒之战甲*1'],
['gift_key' => 'C-1000', 'amount' => 1000, 'gifts' => [['id' => 59, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '神行外观SSSR黑暗能源*1|神·永恒之护腿*1'],
['gift_key' => 'C-1500', 'amount' => 1500, 'gifts' => [['id' => 68, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSR神行·呆萌小鸭|幸运神石*1|进阶资质丹任选箱*3|四象之术|宝石淬炼石*50|中级神兵自选宝箱*20'],
['gift_key' => 'C-2000', 'amount' => 2000, 'gifts' => [['id' => 60, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '灵翼SSSSR风车王国*1|神·永恒之护手*1'],
['gift_key' => 'C-3000', 'amount' => 3000, 'gifts' => [['id' => 61, 'num' => 1], ['id' => 69, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '红色天兽·白龙马*1|神·永恒之战靴*1|SSR坐骑·无量莲台*1|红色符文任选*2|至尊减伤兽魂*1|灵脉心经|注灵石*100|高级神兵自选宝箱*20'],
['gift_key' => 'C-5000', 'amount' => 5000, 'gifts' => [['id' => 66, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '法宝SSSSS魔·鲜血哀歌*1|【至尊】天雷欲动纹*1|混沌天书*1'],
['gift_key' => 'C-6000', 'amount' => 6000, 'gifts' => [['id' => 70, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSR幻武·梦幻卡通*1|红色核心符文【绝对闪避】|至尊伤害兽魂*1|混沌天书*1|注灵石*100|高级神兵自选宝箱*50'],
['gift_key' => 'C-8000', 'amount' => 8000, 'gifts' => [['id' => 67, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '坐骑SSSSS魔·绝影绯狱*1|【至尊】玲珑玄黄经*1|大地宝典*1'],
['gift_key' => 'C-10000', 'amount' => 10000, 'gifts' => [['id' => 62, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '灵翼SSSSS魔·幻鸦黯羽*1|武器SSSSS[魔·吟龙]幻武宝箱自选*1'],
['gift_key' => 'C-12000', 'amount' => 12000, 'gifts' => [['id' => 71, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSR坐骑·奇趣飞燕*1|红色核心符文【致命一击】|至尊属性兽魂*1|大地之书*1|注灵石*150|高级神兵自选宝箱*100'],
['gift_key' => 'C-15000', 'amount' => 15000, 'gifts' => [['id' => 72, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '顶级妖灵·仙灵元神*40|3-5转SR守护进阶材料自选*1|至尊属性兽魂*1|辉煌宝石lv7*1|宝石淬炼石*500|神品淬炼石*100'],
['gift_key' => 'C-20000', 'amount' => 20000, 'gifts' => [['id' => 73, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSR翅膀·风车王国*1|守护觉醒自选|至尊属性兽魂*1|圣器图鉴任选*1|永恒圣装碎片任选*10|400活跃度药水*1|荣耀之纹 Lv.6*1'],
['gift_key' => 'C-30000', 'amount' => 30000, 'gifts' => [['id' => 74, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSR时装·午夜狂欢*1|圣物·天雷欲动纹*1|至尊属性兽魂*2|圣器图鉴任选*1|永恒圣装碎片任选*10|荣耀之纹 Lv.7*1|橙品守护装备任选箱*1'],
['gift_key' => 'C-40000', 'amount' => 40000, 'gifts' => [['id' => 75, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSR坐骑·河洛之灵*1|[至尊]玲珑玄黄经*1|圣器图鉴任选*1|永恒圣装碎片任选*20|至尊属性兽魂*3|荣耀之纹 Lv.8*1|红品守护装备任选箱*1'],
['gift_key' => 'C-50000', 'amount' => 50000, 'gifts' => [['id' => 76, 'num' => 1]], 'game_currency' => 0, 'gift_content' => 'SSSSS武器·神·凤凰涅槃*1|SSSR相框·假面派对*1|圣器图鉴任选*2|永恒圣装碎片任选*30|至尊属性兽魂*3|荣耀之纹 Lv.9*1|【五转法身合成材料】琉璃火珠*3|红品洗炼神晶*10'],
];
$dList = [
['gift_key' => 'D-0', 'amount' => 0, 'gifts' => [['id' => 39, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '坐骑SR【太初神剑】|装备探宝钥匙*10|100积分宝石'],
];
$fList = [
['gift_key' => 'F-227', 'amount' => 227, 'gifts' => [['id' => 43, 'num' => 1], ['id' => 40, 'num' => 1, 'once' => true]], 'game_currency' => 0, 'gift_content' => '1000充值卡*1首次|648充值卡*1'],
];
$gList = [
['gift_key' => 'G-0', 'amount' => 0, 'gifts' => [['id' => 37, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '648元充值卡*4'],
];
$hList = [
['gift_key' => 'H-0', 'amount' => 0, 'gifts' => [['id' => 38, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '648元充值卡*4'],
];
$iList = [
['gift_key' => 'I-3', 'amount' => 3, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-6', 'amount' => 6, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-8', 'amount' => 8, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-12', 'amount' => 12, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-18', 'amount' => 18, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-25', 'amount' => 25, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-30', 'amount' => 30, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-38', 'amount' => 38, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-50', 'amount' => 50, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-58', 'amount' => 58, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-60', 'amount' => 60, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-68', 'amount' => 68, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-88', 'amount' => 88, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-98', 'amount' => 98, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-108', 'amount' => 108, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-128', 'amount' => 128, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-168', 'amount' => 168, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-188', 'amount' => 188, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-198', 'amount' => 198, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-199', 'amount' => 199, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-296', 'amount' => 296, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-298', 'amount' => 298, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-328', 'amount' => 328, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-388', 'amount' => 388, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-648', 'amount' => 648, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-698', 'amount' => 698, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-888', 'amount' => 888, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-998', 'amount' => 998, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-1000', 'amount' => 1000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-1288', 'amount' => 1288, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-1314', 'amount' => 1314, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-1998', 'amount' => 1998, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-2000', 'amount' => 2000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-5000', 'amount' => 5000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-10000', 'amount' => 10000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
];
$kList = [
['gift_key' => 'K-1', 'amount' => 328, 'gifts' => [['id' => 79, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '坐骑进阶丹*100|坐骑祝福卡*20|蛇髓蜕骨丹*10|天魂融血丹*5|真龙化形丹*5'],
['gift_key' => 'K-2', 'amount' => 328, 'gifts' => [['id' => 80, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '灵翼进阶丹*100|灵翼祝福卡*20|孔雀翎*10|毕方翎*5|凤凰翎*1'],
['gift_key' => 'K-3', 'amount' => 328, 'gifts' => [['id' => 81, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '注灵石*50|进化宝石*50|强化宝石*30|中级强化宝石*10'],
['gift_key' => 'K-4', 'amount' => 328, 'gifts' => [['id' => 82, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '法宝进阶丹*100|法宝祝福卡*20|锻器灵石*10|锻器灵玉*5|锻器神晶*1'],
['gift_key' => 'K-5', 'amount' => 328, 'gifts' => [['id' => 83, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '神行进阶丹*100|神行祝福卡*20|杀伐印记*10|战魂印记*5|修罗印记*1'],
['gift_key' => 'K-6', 'amount' => 328, 'gifts' => [['id' => 84, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '宠物升级丹*300|初级攻击兽魂*5|初级生命兽魂*5|初级属性兽魂*2|高级暴击守护*1'],
['gift_key' => 'K-7', 'amount' => 328, 'gifts' => [['id' => 85, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '中级生命神兵*20|中级攻击神兵*20|中级防御神兵*20|中级狂暴神兵*20'],
];
$gameId = 81;
/* $this->saveRebateGifts($gameId, 'A', $aList);
$this->saveRebateGifts($gameId, 'B', $bList);
$this->saveRebateGifts($gameId, 'C', $cList);
$this->saveRebateGifts($gameId, 'D', $dList);
$this->saveRebateGifts($gameId, 'F', $fList);
$this->saveRebateGifts($gameId, 'G', $gList);
$this->saveRebateGifts($gameId, 'H', $hList);
$this->saveRebateGifts($gameId, 'I', $iList); */
$this->saveRebateGifts($gameId, 'K', $kList);
}
// 一剑斩仙309 310 84
/**
* 'A' => '单笔充值福利',
'B' => '月卡福利发放',
'C' => '累充福利发放',创角累充福利
'D' => '首充福利发放',
'E' => '单日累充福利发放',
'F' => '周卡福利发放',
'G' => '首次进游福利',
'H' => '签到福利发放',
'I' => '充值返利发放',
*/
public function initRebateGifts84()
{
$aList = [
['gift_key' => 'A-198', 'amount' => 198, 'gifts' => [['id' => 786, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '绑定元宝*2000|紫灵石*200|七彩凝灵石*50|上品图鉴卡*50|铸灵宝匣*1'],
['gift_key' => 'A-328', 'amount' => 328, 'gifts' => [['id' => 787, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '绑定元宝*3800|仙品神灵丹*5|仙品神兵玄铁*5|上品图鉴卡*100|铸灵宝匣*3'],
['gift_key' => 'A-648', 'amount' => 648, 'gifts' => [['id' => 788, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '绑定元宝*8000|御·炫装灵玉*2|攻·炫装灵玉*2|仙品法宝精华*5|仙品宝灵丹*5'],
['gift_key' => 'A-1000', 'amount' => 1000, 'gifts' => [['id' => 789, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '绑定元宝*18000|至尊·炫装灵玉*2|仙品神兵玄铁*10|上品修为丹*20|仙品炼体丹*10'],
['gift_key' => 'A-2000', 'amount' => 2000, 'gifts' => [['id' => 790, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '绑定元宝*38000|神羽*100|至尊阵灵丹*3|仙兽装备图谱*5|上品修为丹*25|灵羽*200'],
['gift_key' => 'A-3000', 'amount' => 3000, 'gifts' => [['id' => 791, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '绑定元宝*58000|神羽*300|至尊羽灵丹*6|混元仙魄*50|法相符石*50|灵羽*300'],
['gift_key' => 'A-5000', 'amount' => 5000, 'gifts' => [['id' => 792, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '绑定元宝*80000 神羽*500|至尊兽灵丹*12|混元仙魄*100|法相符石*100|灵羽*500'],
['gift_key' => 'A-10000', 'amount' => 10000, 'gifts' => [['id' => 793, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '绑定元宝*180000|图鉴·一剑斩仙*2、1阶天级·宝典*2|至尊仙灵丹*20|紫灵石*3000|法相符石*150'],
['gift_key' => 'A-20000', 'amount' => 20000, 'gifts' => [['id' => 794, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '绑定元宝*380000|图鉴·金刚破魔*2、1阶天级·阵旗*2|1阶真级·命盘*2|至尊兽灵丹*30|法相符石*200'],
];
$bList = [
['gift_key' => 'B-328', 'amount' => 328, 'gifts' => [['id' => 779, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '328元充值卡*1累充328元可激活连续发放30天'],
['gift_key' => 'B-648', 'amount' => 648, 'gifts' => [['id' => 780, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '648元充值卡*1累充648元可激活连续发放30天'],
['gift_key' => 'B-1000', 'amount' => 1000, 'gifts' => [['id' => 781, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '1000元充值卡*1累充1000元可激活连续发放30天'],
['gift_key' => 'B-2000', 'amount' => 2000, 'gifts' => [['id' => 782, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '2000元充值卡*1累充2000元可激活连续发放30天'],
['gift_key' => 'B-3000', 'amount' => 3000, 'gifts' => [['id' => 783, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '3000元充值卡*1累充3000元可激活连续发放30天'],
['gift_key' => 'B-5000', 'amount' => 5000, 'gifts' => [['id' => 784, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '5000元充值卡*1累充5000元可激活连续发放30天'],
['gift_key' => 'B-10000', 'amount' => 10000, 'gifts' => [['id' => 785, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '10000元充值卡*1累充10000元可激活连续发放30天'],
];
$cList = [
['gift_key' => 'C-200', 'amount' => 200, 'gifts' => [['id' => 530, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '头像·喵星人*1、气泡·津门龙客*1炼体礼包*2、初级聚灵礼箱*2、坐骑培养礼包*2'],
['gift_key' => 'C-500', 'amount' => 500, 'gifts' => [['id' => 531, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '像框·津门龙客*1、炫武·真龙天子*1、炼体礼包*5、初级聚灵礼箱*5、坐骑培养礼包*5'],
['gift_key' => 'C-1000', 'amount' => 1000, 'gifts' => [['id' => 532, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '服饰·真龙天子*1、图鉴·金乌圣灵*2、炼体礼包*10、初级聚灵礼箱*10、坐骑培养礼包*10、骑兽腾云宝箱*2'],
['gift_key' => 'C-2000', 'amount' => 2000, 'gifts' => [['id' => 533, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '坐骑·金铃辇车*1、头像·单身贵族*1、炼体礼包*20初级聚灵礼箱*20、坐骑培养礼包*20、灵羽*200'],
['gift_key' => 'C-3000', 'amount' => 3000, 'gifts' => [['id' => 534, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '仙兽·时空骇客*1、相框·清风拂柳*1、炼体礼包*30、初级聚灵礼箱*30、坐骑培养礼包*30、骑兽腾云宝箱*5'],
['gift_key' => 'C-4000', 'amount' => 4000, 'gifts' => [['id' => 795, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '神兵·血阳裂天*1、至尊神灵丹*2、中品神灵丹*20、仙品神灵丹*10、上品神兵玄铁*50、灵羽*300'],
['gift_key' => 'C-8000', 'amount' => 8000, 'gifts' => [['id' => 796, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '足迹·下弦之月*2、称号·坐拥金山银山*1、1阶橙色随机仙兽装备箱*3、仙兽装备图谱*5、天书宝鉴*5。骑兽腾云宝箱*5'],
['gift_key' => 'C-13000', 'amount' => 13000, 'gifts' => [['id' => 797, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '炫武·落英羽织*2、气泡·赏花之旅*2、1阶橙色随机坐骑装备箱*3、坐骑装备图谱*5、天书宝鉴*5、灵羽*500'],
['gift_key' => 'C-20000', 'amount' => 20000, 'gifts' => [['id' => 798, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '服饰·落英羽织*2、相框·赏花之旅*2、1阶橙色随机仙兽装备箱*6、仙兽装备图谱*10、天书宝鉴*10、骑兽腾云宝箱*10'],
['gift_key' => 'C-25000', 'amount' => 25000, 'gifts' => [['id' => 799, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '羽翼·折扇乘风*1、御·炫装灵玉*5、1阶橙色随机坐骑装备箱*6、坐骑装备图谱*6、天书宝鉴*20、灵羽*1000'],
['gift_key' => 'C-30000', 'amount' => 30000, 'gifts' => [['id' => 800, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '坐骑·卷猫寿司*1、攻·炫装灵玉*5、1阶红色随机仙兽装备箱*6、仙兽装备图谱*20、天书宝鉴*30、骑兽腾云宝箱*20'],
['gift_key' => 'C-40000', 'amount' => 40000, 'gifts' => [['id' => 801, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '阵法·一箭倾心阵*2、至尊·炫装灵玉*5、1阶红色随机坐骑装备箱*6、坐骑装备图谱*20、天书宝鉴*50、灵羽*2000'],
['gift_key' => 'C-50000', 'amount' => 50000, 'gifts' => [['id' => 802, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '法宝·御龙环*2、至尊宝灵丹*10、9阶4星粉色首饰自选箱*1、金凤宝珠*10、苍纹赤精*10、仙品宝灵丹*100、仙品法宝精华*100'],
['gift_key' => 'C-70000', 'amount' => 70000, 'gifts' => [['id' => 803, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '神兵·八卦宝炎*2、至尊神灵丹*10、9阶4星粉色首饰自选箱*2、金凤宝珠*20、苍纹赤精*20、中品神灵丹*100、仙品神兵玄铁*100'],
['gift_key' => 'C-100000', 'amount' => 100000, 'gifts' => [['id' => 804, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '坐骑·墨雨邪凤*2、阵法·怒佛盛莲阵*2、9阶4星粉色首饰自选箱*3、金凤宝珠*30、苍纹赤精*30、至尊阵灵丹*20、仙品阵灵丹*100'],
['gift_key' => 'C-150000', 'amount' => 150000, 'gifts' => [['id' => 805, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '服饰·九联神明*3、头像框·神之预言*3、女娲·天*5、女娲·风*5、女娲·水*5、女娲·山*5、至尊印灵丹*20'],
['gift_key' => 'C-200000', 'amount' => 200000, 'gifts' => [['id' => 806, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '武饰·九联神明*3、气泡框·神之预言*3、女娲·地*5、女娲·雷*5女娲·火*5、女娲·泽*5、至尊护灵丹*20'],
['gift_key' => 'C-250000', 'amount' => 250000, 'gifts' => [['id' => 807, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '黄金阵盘*3、坐骑·大力神猿*3、盘古·天*5、盘古·风*5、盘古·水*5、盘古·山*5、至尊羽灵丹*20'],
['gift_key' => 'C-300000', 'amount' => 300000, 'gifts' => [['id' => 808, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '天龙阵盘*3 羽翼·太阳神翼*3 妖皇琉璃盏*3 盘古·地*5 盘古·雷*5 盘古·火*5 盘古·泽*5'],
];
$dList = [
['gift_key' => 'D-0', 'amount' => 0, 'gifts' => [['id' => 778, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '头像框·喵呜*1、成长丹*50、骑兽丹*50、2倍经验丹*3、升星石*3 '],
];
$gList = [
['gift_key' => 'G-0', 'amount' => 0, 'gifts' => [['id' => 776, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '3000元充值卡*1'],
];
$hList = [
['gift_key' => 'H-0', 'amount' => 0, 'gifts' => [['id' => 777, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '10000元宝'],
];
$iList = [
['gift_key' => 'I-1', 'amount' => 1, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-3', 'amount' => 3, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-5', 'amount' => 5, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-6', 'amount' => 6, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-8', 'amount' => 8, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-10', 'amount' => 10, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-12', 'amount' => 12, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-18', 'amount' => 18, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-25', 'amount' => 25, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-30', 'amount' => 30, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-35', 'amount' => 35, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-38', 'amount' => 38, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-48', 'amount' => 48, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-50', 'amount' => 50, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-68', 'amount' => 68, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-88', 'amount' => 88, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-108', 'amount' => 108, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-120', 'amount' => 120, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-128', 'amount' => 128, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-136', 'amount' => 136, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-198', 'amount' => 198, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-199', 'amount' => 199, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-204', 'amount' => 204, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-328', 'amount' => 328, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-388', 'amount' => 388, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-400', 'amount' => 400, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-488', 'amount' => 488, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-648', 'amount' => 648, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-800', 'amount' => 800, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-988', 'amount' => 988, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-1000', 'amount' => 1000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-1288', 'amount' => 1288, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-1688', 'amount' => 1688, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-2000', 'amount' => 2000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-3000', 'amount' => 3000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-5000', 'amount' => 5000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-5888', 'amount' => 5888, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-6888', 'amount' => 6888, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-10000', 'amount' => 10000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
['gift_key' => 'I-20000', 'amount' => 20000, 'gifts' => [], 'game_currency' => 0, 'gift_content' => ''],
];
$fList = [
['gift_key' => 'F-328', 'amount' => 328, 'gifts' => [['id' => 719, 'num' => 1], ['id' => 925, 'num' => 1, 'once' => true]], 'game_currency' => 0, 'gift_content' => '觉醒套任选一套(仙帝,真灵,天师)(首次)|328元充值卡*1'],
];
// $this->saveRebateGifts(84, 'A', $aList);
// $this->saveRebateGifts(84, 'B', $bList);
// $this->saveRebateGifts(84, 'C', $cList);
// $this->saveRebateGifts(84, 'D', $dList);
// $this->saveRebateGifts(84, 'G', $gList);
// $this->saveRebateGifts(84, 'H', $hList);
RebateGift::where('type', 'I')->where('base_game_id', 84)->delete();
$this->saveRebateGifts(84, 'I', $iList);
}
public function initRebateGifts91()
{
$aList = [
['gift_key' => 'A-6', 'amount' => 6, 'gifts' => [['id' => 32, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '单笔6元充值返利'],
['gift_key' => 'A-30', 'amount' => 30, 'gifts' => [['id' => 33, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '单笔30元充值返利'],
['gift_key' => 'A-68', 'amount' => 68, 'gifts' => [['id' => 34, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '单笔68元充值返利'],
['gift_key' => 'A-98', 'amount' => 98, 'gifts' => [['id' => 35, 'num' => 1], ['id' => 10, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '单笔98元充值返利、寻宝牌*50、仙品石宝箱*10、礼金*980'],
['gift_key' => 'A-128', 'amount' => 128, 'gifts' => [['id' => 36, 'num' => 1], ['id' => 13, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '单笔128元充值返利、寻宝牌*100、仙品石宝箱*30、礼金*1280、3级宝石宝箱*5、灵纹宝箱*10、3倍经验药水*1'],
['gift_key' => 'A-198', 'amount' => 198, 'gifts' => [['id' => 37, 'num' => 1], ['id' => 15, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '单笔198元充值返利、寻宝牌*150、仙品石宝箱*50、礼金*1980、4级宝石宝箱*5、灵纹宝箱*20、晋升令*5、3倍经验药水*3'],
['gift_key' => 'A-328', 'amount' => 328, 'gifts' => [['id' => 38, 'num' => 1], ['id' => 16, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '单笔328元充值返利、寻宝牌*200、仙品石宝箱*100、礼金*3280、5级宝石宝箱*5、灵纹宝箱*50、晋升令*10、3倍经验药水*5'],
['gift_key' => 'A-648', 'amount' => 648, 'gifts' => [['id' => 39, 'num' => 1], ['id' => 17, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '单笔648元充值返利、寻宝牌*250、仙品石宝箱*200、礼金*6480、6级宝石宝箱*5、神品石宝箱*30、晋升令*20、神兽拓展卡*1、3倍经验药水*10'],
['gift_key' => 'A-1000', 'amount' => 1000, 'gifts' => [['id' => 40, 'num' => 1], ['id' => 18, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '单笔1000元充值返利、寻宝牌*350、仙品石宝箱*300、礼金*10000、7级宝石宝箱*5、神品石宝箱*50、晋升令*20、神兽拓展卡*1、神兽石*2、魂石*500、3倍经验药水*15'],
['gift_key' => 'A-2000', 'amount' => 2000, 'gifts' => [['id' => 41, 'num' => 1], ['id' => 22, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '单笔2000元充值返利、寻宝牌*500、仙品石宝箱*400、礼金*20000、8级宝石宝箱*5、神品石宝箱*100、晋升令*20、神兽拓展卡*2、神兽石*5、魂石*700、3倍经验药水*25、红晶魄*100'],
['gift_key' => 'A-5000', 'amount' => 5000, 'gifts' => [['id' => 42, 'num' => 1], ['id' => 29, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '单笔5000元充值返利、寻宝牌*800、仙品石宝箱*500、礼金*50000、9级宝石宝箱*5、神品石宝箱*200、晋升令*20、神兽拓展卡*5、神兽石*10、魂石*700、3倍经验药水*35、红晶魄*200、粉色神兽宝箱*5'],
['gift_key' => 'A-10000', 'amount' => 10000, 'gifts' => [['id' => 43, 'num' => 1], ['id' => 28, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '单笔10000元充值返利、寻宝牌*1000、仙品石宝箱*600、礼金*100000、9级宝石宝箱*10、神品石宝箱*300、晋升令*20、神兽拓展卡*10、神兽石*20、魂石*700、3倍经验药水*50、红晶魄*5000、粉色神兽宝箱*10、橙色骑装宝箱*10'],
];
$cList = [
['gift_key' => 'C-100', 'amount' => 100, 'gifts' => [['id' => 2, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '装饰·小黄鸡*1、气泡·富甲天下*1、高级红水晶*60、高级蓝水晶*60'],
['gift_key' => 'C-300', 'amount' => 300, 'gifts' => [['id' => 20, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '侍宠幻化·爱心护士*1、坐骑幻化·地狱战马*1、侍宠进阶丹*300、坐骑进阶丹*300、侍宠灵性丹*30、坐骑灵性丹*30、坐骑技能书*10 '],
['gift_key' => 'C-500', 'amount' => 500, 'gifts' => [['id' => 5, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '相框·勇冠三军*1、侍宠飞升丹*20、坐骑飞升丹*20、侍宠潜能丹*30、坐骑潜能丹*30、侍宠技能书*10'],
['gift_key' => 'C-1000', 'amount' => 1000, 'gifts' => [['id' => 7, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '宠翼·森林幻羽*1、法宝幻化·浩然魂钟*1、宠翼进阶丹*400、法宝进阶丹*400、宠翼飞升丹*20、法宝飞升丹*20、宠翼潜能丹*30、法宝潜能丹*30、宠翼技能书*10'],
['gift_key' => 'C-1500', 'amount' => 1500, 'gifts' => [['id' => 8, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '宠武幻化·鬼武扇*1、仙器幻化·天心邀月*1、宠武进阶丹*600、仙器进阶丹*600、宠武飞升丹*30、仙器飞升丹*30、宠武潜能丹*40、仙器潜能丹*40、宠武技能书*10'],
['gift_key' => 'C-3000', 'amount' => 3000, 'gifts' => [['id' => 9, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '宠骑幻化·萝卜兔*1、齐天大圣·觉醒*1、宠骑进阶丹*800、觉醒进阶丹*800、注灵石*400、宠骑飞升丹*50、宠骑潜能丹*80、宠骑灵性丹*100、宠骑技能书*20'],
['gift_key' => 'C-5000', 'amount' => 5000, 'gifts' => [['id' => 21, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '宠骑幻化·萝卜兔*1、齐天大圣·觉醒*1、宠骑进阶丹*800、觉醒进阶丹*800、注灵石*400、宠骑飞升丹*50、宠骑潜能丹*80、宠骑灵性丹*100、宠骑技能书*20'],
['gift_key' => 'C-8000', 'amount' => 8000, 'gifts' => [['id' => 11, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '侍宠幻化·蓬莱神女*1、红色核心符文【绝对防御】、坐骑幻化·暴龙领主*1、侍宠进阶丹*1000、坐骑进阶丹*1000、神之圣印*100、五行圣印*100、神速飞骑*10、轩辕剑*1'],
['gift_key' => 'C-10000', 'amount' => 10000, 'gifts' => [['id' => 12, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '法宝幻化·太极鱼*1、足迹幻化·龙战于野*1、法宝进阶丹*1200、足迹进阶丹*1200、戒指合成石*20、手镯合成石*20、8级宝石宝箱*20、战场鬼车*10、卡牌【炼药壶】*1'],
['gift_key' => 'C-20000', 'amount' => 20000, 'gifts' => [['id' => 14, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '神魄(火鎧疾梟)*2、红色3星神兽宝箱*1、仙器幻化·定海旗*1、仙器进阶丹*1400、9级宝石宝箱*20、装备神炼石礼包*400、诸葛连弩*10、万能图鉴*150、卡牌【昊天塔】*1'],
['gift_key' => 'C-40000', 'amount' => 40000, 'gifts' => [['id' => 19, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '高级外观自选礼包*6、五阶神翼碎片*阴*2、红色双属性灵魂【仙魂•英烈】*1、孙子兵法*10、高级神炼石礼包*400、卡牌【射日弓】*1、装备技能书礼包*400、晓梦蝴蝶*7、灵晶·次元*2000'],
['gift_key' => 'C-50000', 'amount' => 50000, 'gifts' => [['id' => 27, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '神魄(烈火狻猊)*2、五阶神翼碎片*阳*2、红色双属性灵魂【仙魂•勇猛】*1、红色幻灵迅捷飞龙*1、号令之旗*1、卡牌【太极图】*1、高级红水晶*500、激海将风*7、附灵石·次元200'],
['gift_key' => 'C-80000', 'amount' => 80000, 'gifts' => [['id' => 25, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '法宝·善恶由心*1红色3星神兽宝箱*3红色初级铭刻石*2400红色高级铭刻石*150开光道具礼包*400五阶翅膀碎片*阴*3五阶翅膀碎片*阳*3足迹进阶丹*2000足迹飞升丹*40'],
['gift_key' => 'C-100000', 'amount' => 100000, 'gifts' => [['id' => 26, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '【伏羲】雨之仙坠*1【伏羲】风之仙镯*1【伏羲】暗之仙戒*1【伏羲】雷之仙符*1【伏羲】幻之神翼*1仙之圣印*200魔之圣印*200宠翼进阶丹*2500宠翼飞升丹*40'],
];
$dList = [
['gift_key' => 'D-0', 'amount' => 0, 'gifts' => [['id' => 1, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '注灵石*100觉醒进阶丹*20相框大土豪*1'],
];
$gList = [
['gift_key' => 'G-0', 'amount' => 0, 'gifts' => [['id' => 30, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '648元充值卡*10+坐骑外形:地狱冥虎'],
];
$hList = [
['gift_key' => 'H-0', 'amount' => 0, 'gifts' => [['id' => 31, 'num' => 1]], 'game_currency' => 0, 'gift_content' => '648充值卡*1'],
];
$gameId = 91;
$this->saveRebateGifts($gameId, 'A', $aList);
$this->saveRebateGifts($gameId, 'C', $cList);
$this->saveRebateGifts($gameId, 'D', $dList);
$this->saveRebateGifts($gameId, 'G', $gList);
$this->saveRebateGifts($gameId, 'H', $hList);
}
public function saveRebateGifts($baseGameId, $type, $items)
{
$records = [];
foreach ($items as $item) {
$item['type'] = $type;
$item['base_game_id'] = $baseGameId;
$item['gifts'] = json_encode($item['gifts']);
$records[] = $item;
}
RebateGift::insert($records);
}
public function getListColumnMap($type)
{
$columns = [
'base_game_name' => '游戏名称',
'server_name' => '区服',
'user_account' => '账号',
'role_id' => '角色ID',
'role_name' => '角色名称',
'promote_account' => '所属推广员',
];
if ($type == 'A') {
$columns['pay_amount'] = '充值金额';
} elseif ($type == 'B') {
$columns['pay_amount'] = '当日累计充值金额';
$columns['award_date_range'] = '可领取福利日期';
} elseif ($type == 'C') {
$columns['amount'] = '达到档位金额';
} elseif ($type == 'D') {
$columns['pay_amount'] = '首充金额';
} elseif($type == 'E') {
$columns['pay_amount'] = '当日累计充值金额';
$columns['award_date'] = '达成日期';
} elseif($type == 'F') {
$columns['award_date_range'] = '可领取福利日期';
} elseif($type == 'H') {
$columns['award_date'] = '签到日期';
} elseif ($type == 'I') {
$columns['pay_amount'] = '充值金额';
$columns['times'] = '返利倍数';
} elseif($type == 'J') {
$columns['award_date'] = '达成日期';
$columns['pay_amount'] = '当日累充总额';
$columns['times'] = '返利倍数';
$columns['amount'] = '申请总价值';
}
if ($type == 'J') {
$columns['gift_content'] = '申请道具';
} elseif($type == 'I') {
} else {
$columns['gift_content'] = '奖励内容';
}
$columns = array_merge($columns, [
'create_time' => '订单生成时间',
'review_status_text' => '审核状态',
'review_time' => '审核时间',
'send_status_text' => '发放状态',
'send_time' => '发放时间',
'reviewer_username' => '审核人',
]);
return $columns;
}
public function getListColumns($type)
{
$columns = [];
foreach ($this->getListColumnMap($type) as $key => $name) {
$columns[] = ['key' => $key, 'name' => $name];
}
return $columns;
}
}