|
@@ -330,15 +330,9 @@ class SuperballActivityService
|
|
|
$complete = 0;
|
|
$complete = 0;
|
|
|
}
|
|
}
|
|
|
// 所有任务累加
|
|
// 所有任务累加
|
|
|
- $tierConfigs = $this->getTierConfig();
|
|
|
|
|
$ballCount = 0;
|
|
$ballCount = 0;
|
|
|
- foreach ($tierConfigs as $config) {
|
|
|
|
|
- if ($config['sort_index'] < $tierConfig->sort_index) {
|
|
|
|
|
- continue;
|
|
|
|
|
- }
|
|
|
|
|
- if ($config['recharge_required'] <= $rechargeToday && $config['turnover_required'] <= ($turnoverToday / NumConfig::NUM_VALUE)) {
|
|
|
|
|
- $ballCount += (int) $config['ball_count'];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if ($complete) {
|
|
|
|
|
+ $ballCount = $tierConfig->ball_count;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if ($ballCount < 1) {
|
|
if ($ballCount < 1) {
|
|
@@ -405,18 +399,8 @@ class SuperballActivityService
|
|
|
|
|
|
|
|
$ballCount = 0;
|
|
$ballCount = 0;
|
|
|
$tierConfig = $this->getTierConfigByTier($task->tier);
|
|
$tierConfig = $this->getTierConfigByTier($task->tier);
|
|
|
- $rechargeToday = $this->getUserRechargeForDate($userId, $today);
|
|
|
|
|
- $turnoverToday = $this->getUserTotalBetForDate($userId, $today);
|
|
|
|
|
if ($task && $task->status == 1) {
|
|
if ($task && $task->status == 1) {
|
|
|
- $tierConfigs = $this->getTierConfig();
|
|
|
|
|
- foreach ($tierConfigs as $config) {
|
|
|
|
|
- if ($config['sort_index'] < $tierConfig->sort_index) {
|
|
|
|
|
- continue;
|
|
|
|
|
- }
|
|
|
|
|
- if ($config['recharge_required'] <= $rechargeToday && $config['turnover_required'] <= ($turnoverToday / NumConfig::NUM_VALUE)) {
|
|
|
|
|
- $ballCount += (int) $config['ball_count'];
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $ballCount = $tierConfig->ball_count;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$existing = DB::connection('write')->table(TableName::agent() . 'superball_user_balls')
|
|
$existing = DB::connection('write')->table(TableName::agent() . 'superball_user_balls')
|
|
@@ -651,11 +635,9 @@ class SuperballActivityService
|
|
|
if (!$task || $task->status == 0) {
|
|
if (!$task || $task->status == 0) {
|
|
|
$recharge = $this->getUserRechargeForDate($userId, $date);
|
|
$recharge = $this->getUserRechargeForDate($userId, $date);
|
|
|
$turnover = $this->getUserTotalBetForDate($userId, $date) / NumConfig::NUM_VALUE;
|
|
$turnover = $this->getUserTotalBetForDate($userId, $date) / NumConfig::NUM_VALUE;
|
|
|
- $configs = $this->getTierConfig();
|
|
|
|
|
- foreach ($configs as $config) {
|
|
|
|
|
- if ($recharge >= $config['recharge_required'] && $turnover >= $config['turnover_required']) {
|
|
|
|
|
- $ball += $config['ball_count'];
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $config = $this->getTierConfigByTier($task->tier);
|
|
|
|
|
+ if ($recharge >= $config['recharge_required'] && $turnover >= $config['turnover_required']) {
|
|
|
|
|
+ $ball = $config->ball_count;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
Redis::set($cacheKey, $ball);
|
|
Redis::set($cacheKey, $ball);
|