|
@@ -189,7 +189,7 @@ class LoginController extends Controller
|
|
|
$SendGold = SystemStatusInfo::OnlyGetCacheValue('BindPhoneReward') ?? 500;
|
|
$SendGold = SystemStatusInfo::OnlyGetCacheValue('BindPhoneReward') ?? 500;
|
|
|
DB::table('QPRecordDB.dbo.LogProp')->insert(['UserID' => $UserID, 'PropID' => 30000, 'PropNum' => $SendGold, 'Source' => 11, 'Param' => null]);
|
|
DB::table('QPRecordDB.dbo.LogProp')->insert(['UserID' => $UserID, 'PropID' => 30000, 'PropNum' => $SendGold, 'Source' => 11, 'Param' => null]);
|
|
|
|
|
|
|
|
- OuroGameService::AddScore($UserID, $SendGold, OuroGameService::REASON_BindPhone);
|
|
|
|
|
|
|
+ OuroGameService::AddScore($UserID, $SendGold, OuroGameService::REASON_BindPhone,false);
|
|
|
|
|
|
|
|
$RecordPlatformDataModel = new \App\Models\RecordPlatformData();
|
|
$RecordPlatformDataModel = new \App\Models\RecordPlatformData();
|
|
|
$RecordPlatformDataModel->BindToday($Channel,$user->RegisterDate);
|
|
$RecordPlatformDataModel->BindToday($Channel,$user->RegisterDate);
|
|
@@ -667,16 +667,23 @@ class LoginController extends Controller
|
|
|
}
|
|
}
|
|
|
GlobalUserInfo::$me = $user;
|
|
GlobalUserInfo::$me = $user;
|
|
|
if (intval($request->input('pwa', 0)) == 1) {
|
|
if (intval($request->input('pwa', 0)) == 1) {
|
|
|
- if (intval($user->PwaInstalled) == 0) {
|
|
|
|
|
- $user->update(['PwaInstalled' => 1]);
|
|
|
|
|
- $config = RouteService::getChannelConfig($request);
|
|
|
|
|
- if($config->BONUS_PWA()>0){
|
|
|
|
|
- OuroGameService::AddScore($user->UserID,$config->BONUS_PWA(),OuroGameService::REASON_PwaBonus,false);
|
|
|
|
|
|
|
+ $redisKey = 'pwa_install_bonus_' . $user->UserID;
|
|
|
|
|
+ if (SetNXLock::getExclusiveLock($redisKey, 10)) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (intval($user->PwaInstalled) == 0) {
|
|
|
|
|
+ $user->update(['PwaInstalled' => 1]);
|
|
|
|
|
+ $config = RouteService::getChannelConfig($request);
|
|
|
|
|
+ if($config->BONUS_PWA()>0){
|
|
|
|
|
+ OuroGameService::AddScore($user->UserID,$config->BONUS_PWA(),OuroGameService::REASON_PwaBonus,false);
|
|
|
|
|
+ }
|
|
|
|
|
+ if(date('Ymd',strtotime($user->RegisterDate)) == date('Ymd')){
|
|
|
|
|
+ $RecordPlatformDataModel = new \App\Models\RecordPlatformData();
|
|
|
|
|
+ $RecordPlatformDataModel->PwaToday($user->Channel);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ SetNXLock::release($redisKey);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- $RecordPlatformDataModel = new \App\Models\RecordPlatformData();
|
|
|
|
|
-
|
|
|
|
|
- $RecordPlatformDataModel->PwaToday($user->Channel);
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return $user;
|
|
return $user;
|