Przeglądaj źródła

提交tt订单编码处理异常

lvhao 6 miesięcy temu
rodzic
commit
2e4c2a48cc
1 zmienionych plików z 9 dodań i 5 usunięć
  1. 9 5
      core/CoreApp/models/Model_apitt.php

+ 9 - 5
core/CoreApp/models/Model_apitt.php

@@ -117,8 +117,14 @@ function __construct(){
 					$num = 0;
 				}else{
 					$tmp_number_arr = explode("-",$info['number']);
-					$num = array_pop($tmp_number_arr);
-					$num = $num*1;
+					//合并订单
+					if(count($tmp_number_arr) == 4){
+						$num = $this->fullordertt->find_count('gtime = "'.date('Ymd',$create_time).'" and shop = "'.$shop['id'].'"');
+					}else{
+						$num = array_pop($tmp_number_arr);
+						$num = $num*1;
+					}
+					
 				}
 				$gnum[date('ymd',$create_time)] = $num+1;
 			}
@@ -282,9 +288,7 @@ function __construct(){
 	   //    $numberwb = $numberwb+7;
 	   // }
 		$post['number'] = $shop['shortname'].'-'.substr(date('ymd',substr($data['create_time'],0,10)-$sjc),1).'-'.$numberwb;//编号
-		if($post['number'] =='TT-QV-50202-002'){
-		    $shop['shortname'].'-'.substr(date('ymd',substr($data['create_time'],0,10)-$sjc),1).'-'.$numberwb."21";
-		}
+		
 		$post['orderinfo'] = $data['id'];//订单号
 		$post['insurance'] = 0;//运输保险费用
 		$address = $data['recipient_address']['address_detail'];