|
@@ -1,6 +1,7 @@
|
1
|
1
|
<?php
|
2
|
2
|
namespace App\Console\Commands;
|
3
|
3
|
|
|
4
|
+use App\Log;
|
4
|
5
|
use Illuminate\Console\Command;
|
5
|
6
|
use DB;
|
6
|
7
|
use App\Order;
|
|
@@ -34,8 +35,10 @@ class FxSyncMjOrderStatus extends Command {
|
34
|
35
|
|
35
|
36
|
$orders = Order::select('id', 'outerCode', 'admin_id')->where('orderCode','>',0)->where('status', '<', 3)->where('warehouse', 3)->where('is_del', 0)->orderBy('id', 'desc')->get();
|
36
|
37
|
$orders = json_decode(json_encode($orders), true);
|
|
38
|
+ Log::errorLog($orders,[],"order/mjApi",1,'');
|
37
|
39
|
foreach($orders as $k=>$order){
|
38
|
40
|
$result = $this->getMjOrder($order['id'], $order['outerCode']);
|
|
41
|
+ Log::errorLog($result,[],"order/mjApi",1,'');
|
39
|
42
|
if( !empty($result) ){
|
40
|
43
|
$data = array();
|
41
|
44
|
if( isset($result['expressCode']) && !empty($result['expressCode']) ){
|
|
@@ -66,6 +69,8 @@ class FxSyncMjOrderStatus extends Command {
|
66
|
69
|
}
|
67
|
70
|
|
68
|
71
|
if(!empty($data)){
|
|
72
|
+ Log::errorLog($data,[],"order/orderUpdate",1,'');
|
|
73
|
+
|
69
|
74
|
Order::where('id', $order['id'])->update($data);
|
70
|
75
|
}
|
71
|
76
|
}
|