|
|
@@ -60,32 +60,14 @@ class OuroGameService
|
|
|
$ingame_state=Redis::get($key)??-1;
|
|
|
return intval($ingame_state);
|
|
|
}
|
|
|
- public static function AddScore($UserID,$GiftScore,$reason=null,$record=true)
|
|
|
+ public static function AddScore($UserID,$GiftScore,$reason=null,$notify=true)
|
|
|
{
|
|
|
// 增加用户金币
|
|
|
$OrgScore = DB::table('QPTreasureDB.dbo.GameScoreInfo')->where('UserID', $UserID)->value('Score');
|
|
|
|
|
|
Log::info('OuroService变化金币' . $GiftScore);
|
|
|
DB::table('QPTreasureDB.dbo.GameScoreInfo')->where('UserID', $UserID)->increment('Score',$GiftScore);
|
|
|
-
|
|
|
$NowScore=$OrgScore+$GiftScore;
|
|
|
- if(!$record){
|
|
|
- return [$OrgScore,$NowScore];
|
|
|
- }
|
|
|
- // 服务器通知
|
|
|
-
|
|
|
-// $url = config('transfer.stock')['url'] . 'notifyPay';
|
|
|
-//
|
|
|
-// $data = [
|
|
|
-// 'userid' => $UserID,
|
|
|
-// 'getScore' => $GiftScore,
|
|
|
-// 'score' => $NowScore,
|
|
|
-// ];
|
|
|
-
|
|
|
-// (new HttpCurl())->service($url, $data);
|
|
|
- self::notifyWebHall($UserID,"",'pay_finish',["Golds"=>$NowScore,"PayNum"=>$GiftScore]);
|
|
|
-
|
|
|
-
|
|
|
RecordScoreInfo::addScore($UserID, $GiftScore, $reason, $OrgScore); #赠送彩金
|
|
|
|
|
|
if($reason){
|
|
|
@@ -94,6 +76,10 @@ class OuroGameService
|
|
|
use QPRecordDB;
|
|
|
exec QPRecordDB.dbo.GSP_YN_GR_RecordGameScore $UserID,$GiftScore,$reason,0,'',0,0");
|
|
|
}
|
|
|
+ if(!$notify){
|
|
|
+ return [$OrgScore,$NowScore];
|
|
|
+ }
|
|
|
+ self::notifyWebHall($UserID,"",'pay_finish',["Golds"=>$NowScore,"PayNum"=>$GiftScore]);
|
|
|
|
|
|
return [$OrgScore,$NowScore];
|
|
|
}
|