소스 검색

test exe() file

LD 5 년 전
부모
커밋
de315b3de4
2개의 변경된 파일1개의 추가작업 그리고 46개의 파일을 삭제
  1. 1 1
      app/Http/Controllers/TestController.php
  2. 0 45
      database/migrations/2021_03_01_150232_create_delivery_appointments_table.php

+ 1 - 1
app/Http/Controllers/TestController.php

@@ -167,7 +167,7 @@ class TestController extends Controller
             });
     }
     public function exe(OwnerFeeDetail $feeBill){
-        $order = Order::query()->where("id",$feeBill->outer_id);
+        $order = Order::query()->where("id",$feeBill->outer_id)->first();
         $order->loadMissing("packages","owner");//加载包裹
         if (!$order->packages || !$order->owner)return false;
         $order->owner->loadCount("ownerPriceExpresses");

+ 0 - 45
database/migrations/2021_03_01_150232_create_delivery_appointments_table.php

@@ -1,45 +0,0 @@
-<?php
-
-use Illuminate\Database\Migrations\Migration;
-use Illuminate\Database\Schema\Blueprint;
-use Illuminate\Support\Facades\Schema;
-
-class CreateDeliveryAppointmentsTable extends Migration
-{
-    public $authorities = [
-        "入库管理-盘收一体-客户预约",
-    ];
-    /**
-     * Run the migrations.
-     *
-     * @return void
-     */
-    public function up()
-    {
-        Schema::create('delivery_appointments', function (Blueprint $table) {
-            $table->id();
-            $table->timestamps();
-        });
-        foreach ($this->authorities as $authority){
-            \App\Authority::query()->firstOrCreate([
-                "name"=>$authority
-            ],[
-                "name"=>$authority,
-                "alias_name"=>$authority
-            ]);
-        }
-    }
-
-    /**
-     * Reverse the migrations.
-     *
-     * @return void
-     */
-    public function down()
-    {
-        Schema::dropIfExists('delivery_appointments');
-        foreach ($this->authorities as $authority){
-            \App\Authority::query()->where("name",$authority)->delete();
-        }
-    }
-}