|
@@ -263,7 +263,9 @@ class BetService extends BaseService
|
|
|
'date' => $now,
|
|
'date' => $now,
|
|
|
'member_id' => $memberId,
|
|
'member_id' => $memberId,
|
|
|
'betting_amount' => $amount,
|
|
'betting_amount' => $amount,
|
|
|
- 'rebate_ratio' => $rebate
|
|
|
|
|
|
|
+ 'rebate_ratio' => $rebate,
|
|
|
|
|
+ 'first_name' => $userInfo->first_name,
|
|
|
|
|
+ 'username' => $userInfo->username,
|
|
|
]);
|
|
]);
|
|
|
// // 返利
|
|
// // 返利
|
|
|
// $rebate = Config::where('field', 'rebate')->first()->val;
|
|
// $rebate = Config::where('field', 'rebate')->first()->val;
|
|
@@ -543,36 +545,35 @@ class BetService extends BaseService
|
|
|
|
|
|
|
|
|
|
|
|
|
// 虚拟开奖
|
|
// 虚拟开奖
|
|
|
- public static function fakeLotteryDraw($issue_no,$awards,$rand_num = 30)
|
|
|
|
|
|
|
+ public static function fakeLotteryDraw($issue_no, $awards, $rand_num = 30)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
- $fake_bet_list = Cache::get('fake_bet_'.$issue_no,[]);
|
|
|
|
|
|
|
+ $fake_bet_list = Cache::get('fake_bet_' . $issue_no, []);
|
|
|
$text = "";
|
|
$text = "";
|
|
|
|
|
|
|
|
- foreach($fake_bet_list as $k => $v){
|
|
|
|
|
- $lastStr = self::getLastChar($v['first_name'],1);
|
|
|
|
|
- if(in_array($v['keywords'],$awards)){
|
|
|
|
|
|
|
+ foreach ($fake_bet_list as $k => $v) {
|
|
|
|
|
+ $lastStr = self::getLastChar($v['first_name'], 1);
|
|
|
|
|
+ if (in_array($v['keywords'], $awards)) {
|
|
|
$profit = $v['amount'] * $v['odds'];
|
|
$profit = $v['amount'] * $v['odds'];
|
|
|
- if($profit > 880000){
|
|
|
|
|
|
|
+ if ($profit > 880000) {
|
|
|
$profit = 880000; // 单注最高奖金880000
|
|
$profit = 880000; // 单注最高奖金880000
|
|
|
}
|
|
}
|
|
|
$item['profit'] = $profit;
|
|
$item['profit'] = $profit;
|
|
|
|
|
|
|
|
$yl = $profit - $v['amount'];
|
|
$yl = $profit - $v['amount'];
|
|
|
- if($k+1 <= $rand_num){
|
|
|
|
|
- $text .= "私聊下注 【******".$lastStr."】 {$yl}\n";
|
|
|
|
|
|
|
+ if ($k + 1 <= $rand_num) {
|
|
|
|
|
+ $text .= "私聊下注 【******" . $lastStr . "】 {$yl}\n";
|
|
|
}
|
|
}
|
|
|
- }else{
|
|
|
|
|
- if($k+1 <= $rand_num){
|
|
|
|
|
- $text .= "私聊下注 【******".$lastStr."】 -{$v['amount']}\n";
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if ($k + 1 <= $rand_num) {
|
|
|
|
|
+ $text .= "私聊下注 【******" . $lastStr . "】 -{$v['amount']}\n";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $text;
|
|
return $text;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|