瀏覽代碼

添加修改

lvhao 5 天之前
父節點
當前提交
6d72513990
共有 1 個文件被更改,包括 21 次插入8 次删除
  1. 21 8
      core/CoreApp/controllers/Fullordersmt.php

+ 21 - 8
core/CoreApp/controllers/Fullordersmt.php

@@ -2264,15 +2264,28 @@ class Fullordersmt extends Start_Controller {
 							foreach ($hdata as $v) 
 							{
 								$result_t = $this->apismt->get_out($msg,'all',$v['orderinfo'],$ex['aecode'],$shop['code']);
-								$result = $result_t['result'];
-					            if(isset($result['success']) && $result['success'] == "true")
-					            {
-									 $this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>1),$v['id']);
-								}
-								else
-								{
-									$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>2),$v['id']);
+								if(isset($result_t['result'])){
+									$result = $result_t['result'];
+									if(isset($result['success']) && $result['success'] == "true")
+									{
+										$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>1),$v['id']);
+									}
+									else
+									{
+										$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>2),$v['id']);
+									}
+								}else{
+									if(isset($d['result_success']) && $d['result_success'] == "true")
+									{
+										$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>1),$v['id']);
+									}
+									else
+									{
+										$this->fullordersmt->save(array('waybill'=>$msg,'state'=>209,'dlz'=>2),$v['id']);
+									}
 								}
+								
+					            
 								$i++;
 								if($i > 10)
 								{