lvhao 4 дней назад
Родитель
Сommit
11ca0a27d2
1 измененных файлов с 9 добавлено и 1 удалено
  1. 9 1
      core/CoreApp/controllers/Apitt.php

+ 9 - 1
core/CoreApp/controllers/Apitt.php

@@ -1096,6 +1096,7 @@ $j = json_decode($j, true);
 				exit;
 			}
             $d = $this->fullordertt->get_orderinfo($j['data']['order_id']);
+			$this->logic_ding->sendToDing($j['data']['order_id']."获取TT的webhook数据:".json_encode($j));
 			if($d)
 			{
 				$post = $this->fullordertt->read($d['id']);
@@ -1158,13 +1159,20 @@ $j = json_decode($j, true);
 							else if(stripos($ex,"ONTRAC") !== false)
 							{
 								$express = 62;
+							}else if(stripos($ex,"Collections by TikTok") !== false){
+								$express = 83;
 							}
 							$time = time();
 							$post['waybill'] = $waybill;
 							$post['express'] = $express;
 							$express_id = $express;
 							$d['waybill'] = $waybill;
-							$this->fullordertt->save(array('state'=>216,'fpdata'=>$d['fpdata'],'waybill'=>$waybill,'print'=>3,'printtime'=>$time,'printnumber'=>1,'libraryconfirm'=>2,'library'=>2,'librarytime'=>$time,'weight'=>'0.4kg','review'=>6,'reviewtime'=>$time,'express'=>$express),$d['id']);
+							if(empty($express_id)){
+								$this->fullordertt->save(array('state'=>216,'fpdata'=>$d['fpdata'],'waybill'=>$waybill,'print'=>3,'printtime'=>$time,'printnumber'=>1,'libraryconfirm'=>2,'library'=>2,'librarytime'=>$time,'weight'=>'0.4kg','review'=>6,'reviewtime'=>$time),$d['id']);
+							}else{
+								$this->fullordertt->save(array('state'=>216,'fpdata'=>$d['fpdata'],'waybill'=>$waybill,'print'=>3,'printtime'=>$time,'printnumber'=>1,'libraryconfirm'=>2,'library'=>2,'librarytime'=>$time,'weight'=>'0.4kg','review'=>6,'reviewtime'=>$time,'express'=>$express),$d['id']);
+							}
+							
 						}
 						else
 						{