sunhao 5 years ago
parent
commit
1531ff02a8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/Console/Commands/SyncCustSaler.php

+ 2 - 1
app/Console/Commands/SyncCustSaler.php

17
 
17
 
18
     public function handle()
18
     public function handle()
19
     {
19
     {
20
-        $this->SyncCustSaler();
20
+        $this->syncFugou();
21
     }
21
     }
22
 
22
 
23
     
23
     
27
         foreach($customers as $k=>$v){
27
         foreach($customers as $k=>$v){
28
             //更新第一单为非复购
28
             //更新第一单为非复购
29
             $first_order = DB::table('order')->select('id')->where('receiverMobile', $v['phone'])->where('is_del',0)->orderBy('id', 'asc')->first();
29
             $first_order = DB::table('order')->select('id')->where('receiverMobile', $v['phone'])->where('is_del',0)->orderBy('id', 'asc')->first();
30
+            if(empty($first_order)) continue;
30
             DB::table('order')->where('id', $first_order->id)->update(['is_fugou'=>0]);
31
             DB::table('order')->where('id', $first_order->id)->update(['is_fugou'=>0]);
31
 
32
 
32
             //单数
33
             //单数