sunhao il y a 5 ans
Parent
commit
2d518397eb
1 fichiers modifiés avec 10 ajouts et 6 suppressions
  1. 10 6
      app/Console/Commands/SyncOrderToMj.php

+ 10 - 6
app/Console/Commands/SyncOrderToMj.php

@@ -37,15 +37,19 @@ class SyncOrderToMj extends Command {
37 37
         foreach($result as $id){
38 38
             $mjOrder = $this->getMjOrder($id);
39 39
             if(!empty($mjOrder)){
40
-                $res = $this->updateOrderToMj($id);
40
+                if($mjOrder['status'] == '已取消'){
41
+                    $res = $this->updateOrderToMj($id);
42
+                    echo "\n订单ID:".$id." 卖家取消订单重新更新";
43
+                }
41 44
             }else{
42 45
                 $res = $this->syncOrderToMj($id);
46
+                if(!$res){
47
+                    echo "\n订单ID:".$id." 同步失败";
48
+                }else{
49
+                    echo "\n订单ID:".$id." 同步成功";
50
+                }
43 51
             }
44
-            if(!$res){
45
-                echo "\n订单ID:".$id." 同步失败";
46
-            }else{
47
-                echo "\n订单ID:".$id." 同步成功";
48
-            }
52
+            
49 53
         }
50 54
     }
51 55