Ken 2 mesiacov pred
rodič
commit
41807308a2

+ 3 - 1
app/Http/Controllers/api/Issue.php

@@ -95,7 +95,6 @@ class Issue extends BaseController
         $issue_no2 = $data2->issue_no + 1;
         $issue_no2 .= '';
         $data1 = \App\Models\Issue::where('issue_no', $issue_no2)->first();
-//        $data1 = null;
         $end_time = $data1 ? strtotime($data1->end_time) : (bcadd(strtotime($data2->end_time), 210, 0));
 
         $winnings = explode(',', $data2->winning_numbers);
@@ -156,6 +155,9 @@ class Issue extends BaseController
 //            'status'=>3
             ];
             $res = IssueService::paginate($params);
+            foreach ($res['data'] as &$item){
+                $item['day'] = date("m-d H:i",strtotime($item['end_time']));
+            }
         } catch (ValidationException $e) {
             return $this->error($e->validator->errors()->first());
         } catch (Exception $e) {

+ 55 - 0
database/migrations/2025_11_10_133313_create_cao_history.php

@@ -0,0 +1,55 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('cao_history', function (Blueprint $table) {
+            $table->id();
+            $table->string('date')->unique()->comment('日期');
+            $table->integer('total')->default(0)->comment('总期数');
+            $table->integer('big')->default(0)->comment('大');
+            $table->integer('small')->default(0)->comment('小');
+            $table->integer('odd')->default(0)->comment('奇数');
+            $table->integer('even')->default(0)->comment('偶数');
+
+            $table->integer('big_odd')->default(0)->comment('大单');
+            $table->integer('big_even')->default(0)->comment('大双');
+
+            $table->integer('small_odd')->default(0)->comment('小单');
+            $table->integer('small_even')->default(0)->comment('小双');
+
+            $table->integer('max')->default(0)->comment('极大');
+            $table->integer('min')->default(0)->comment('极小');
+
+            $table->integer('pair')->default(0)->comment('对子');
+            $table->integer('sequence')->default(0)->comment('顺子');
+            $table->integer('leopard')->default(0)->comment('豹子');
+
+
+            $table->integer('num_0')->default(0)->comment("00号");
+
+
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('cao_history');
+    }
+};