|
@@ -14,6 +14,7 @@ use Illuminate\Support\Facades\Log;
|
|
|
use App\Services\GameplayRuleService;
|
|
|
use App\Constants\GameplayRuleEnum;
|
|
|
use App\Services\KeyboardService;
|
|
|
+use Telegram\Bot\FileUpload\InputFile;
|
|
|
|
|
|
/**
|
|
|
* 投注
|
|
@@ -532,4 +533,35 @@ class IssueService extends BaseService
|
|
|
}
|
|
|
return $result; // 不在任何段中
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @description: 近期开奖记录
|
|
|
+ * @return {*}
|
|
|
+ */
|
|
|
+ public static function currentLotteryResults($memberId)
|
|
|
+ {
|
|
|
+ $result = self::model()::where('status', self::model()::STATUS_DRAW)->orderBy('id','desc')->get();
|
|
|
+ if($result){
|
|
|
+ if($result->image){
|
|
|
+ self::telegram()->sendPhoto([
|
|
|
+ 'chat_id' => $memberId,
|
|
|
+ 'photo' => InputFile::create(url($result->image)),
|
|
|
+ ]);
|
|
|
+ }else{
|
|
|
+ // if($result->combo){
|
|
|
+ // self::telegram()->sendMessage([
|
|
|
+ // 'chat_id' => $memberId,
|
|
|
+ // 'text' => "",
|
|
|
+ // ]);
|
|
|
+ // }else{
|
|
|
+ self::telegram()->sendMessage([
|
|
|
+ 'chat_id' => $memberId,
|
|
|
+ 'text' => "暂无开奖记录",
|
|
|
+ ]);
|
|
|
+ // }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|