|
|
@@ -618,6 +618,7 @@ class BetService extends BaseService
|
|
|
$otherSum = self::model()::where('issue_no',$issue_no)->where('status',self::model()::STATUS_STAY)->whereIn('keywords',['大','小','单','双'])->sum('amount');
|
|
|
|
|
|
$fakeOpenData = self::fakeLotteryDraw($issue_no, $awards, 0);
|
|
|
+ $keywordsList = $fakeOpenData['keywordsList'];
|
|
|
$fakeOtherSum = $fakeOpenData['sum'];
|
|
|
$sum = $otherSum + $fakeOtherSum;
|
|
|
|
|
|
@@ -637,6 +638,11 @@ class BetService extends BaseService
|
|
|
$memberList = [];
|
|
|
$bet_num = 0;
|
|
|
foreach ($list->toArray() as $k => $v) {
|
|
|
+ if(isset($keywordsList[$v['keywords']])){
|
|
|
+ $keywordsList[$v['keywords']] += $v['amount'];
|
|
|
+ }else{
|
|
|
+ $keywordsList[$v['keywords']] = $v['amount'];
|
|
|
+ }
|
|
|
// $userInfo = UserService::findAll(['member_id' => $v['member_id']]);
|
|
|
// $lastStr = self::getLastChar($userInfo->first_name, 1);
|
|
|
$lastStr = self::hideMiddleDigits($v['member_id'], 4);
|
|
|
@@ -827,7 +833,7 @@ class BetService extends BaseService
|
|
|
// self::bettingGroupNotice($text, $inlineButton, '');
|
|
|
// SendTelegramGroupMessageJob::dispatch($text,$inlineButton,'');
|
|
|
|
|
|
- self::lotteryNotice($openList, $issue_no);
|
|
|
+ self::lotteryNotice($openList, $issue_no ,$keywordsList);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -999,6 +1005,8 @@ class BetService extends BaseService
|
|
|
$fake_bet_list = Cache::get('fake_bet_' . $issue_no, []);
|
|
|
$text = "";
|
|
|
|
|
|
+ $keywordsList = [];
|
|
|
+
|
|
|
$fakeOtherSum = 0;
|
|
|
$openList = [];
|
|
|
|
|
|
@@ -1006,6 +1014,13 @@ class BetService extends BaseService
|
|
|
if(in_array($v['keywords'],['大','小','单','双'])){
|
|
|
$fakeOtherSum += $v['amount'];
|
|
|
}
|
|
|
+
|
|
|
+ if(isset($keywordsList[$v['keywords']])){
|
|
|
+ $keywordsList[$v['keywords']] += $v['amount'];
|
|
|
+ }else{
|
|
|
+ $keywordsList[$v['keywords']] = $v['amount'];
|
|
|
+ }
|
|
|
+
|
|
|
// $lastStr = self::getLastChar($v['first_name'], 1);
|
|
|
$lastStr = self::hideMiddleDigits($v['member_id'], 4);
|
|
|
if (in_array($v['keywords'], $awards)) {
|
|
|
@@ -1064,11 +1079,11 @@ class BetService extends BaseService
|
|
|
|
|
|
}
|
|
|
|
|
|
- return ['sum' => $fakeOtherSum ,'list' => $openList];
|
|
|
+ return ['sum' => $fakeOtherSum ,'list' => $openList ,'keywordsList' => $keywordsList];
|
|
|
}
|
|
|
|
|
|
// 开奖通知
|
|
|
- public static function lotteryNotice($openList, $issue_no)
|
|
|
+ public static function lotteryNotice($openList, $issue_no,$keywordsList = [])
|
|
|
{
|
|
|
$betNoticeNum = Config::where('field', 'bet_notice_num')->first()->val;
|
|
|
$betNoticeNum = explode(',', $betNoticeNum);
|
|
|
@@ -1125,8 +1140,19 @@ class BetService extends BaseService
|
|
|
|
|
|
// 群通知
|
|
|
// self::bettingGroupNotice($text, $inlineButton, '');
|
|
|
+
|
|
|
+ if($keywordsList){
|
|
|
+ $text3 = "📝 {$issue_no}期投注统计 \n";
|
|
|
+ foreach($keywordsList as $k => $v){
|
|
|
+ $text3 .= "{$k}:{$v} \n";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ SendTelegramGroupMessageJob::dispatch($text3, $inlineButton, '');
|
|
|
+
|
|
|
SendTelegramGroupMessageJob::dispatch($text, $inlineButton, '');
|
|
|
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|