seven 4 일 전
부모
커밋
12218c3a08
1개의 변경된 파일20개의 추가작업 그리고 21개의 파일을 삭제
  1. 20 21
      app/Services/IssueService.php

+ 20 - 21
app/Services/IssueService.php

@@ -541,28 +541,27 @@ class IssueService extends BaseService
     public static function currentLotteryResults($memberId)
     {
         $result = self::model()::where('status', self::model()::STATUS_DRAW)->orderBy('id','desc')->first();
-        return $result->image;
-        // 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' => "暂无开奖记录",
-        //             ]);
-        //         // }
+        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' => "暂无开奖记录",
+                    ]);
+                // }
                 
-        //     }
+            }
             
-        // }
+        }
     }
 }