lvhao 3 dni temu
rodzic
commit
e40a9abc52
1 zmienionych plików z 9 dodań i 4 usunięć
  1. 9 4
      core/CoreApp/controllers/Aatest.php

+ 9 - 4
core/CoreApp/controllers/Aatest.php

@@ -91,10 +91,15 @@ class Aatest extends Start_Controller {
     public function _remap($arg,$arg_array)
     {  
 
-		$r = $this->db->from("returngoods")->where('email is null')->order_by('id','desc')->get()->result_array();
-		echo "<pre>";
-		print_r($r[0]);
-		die;
+		$list = $this->db->from("returngoods")->where('email is null')->order_by('id','desc')->get()->result_array();
+		foreach($list as $v){
+			$info = $this->logic_order->getInfo("number = '{$v['number']}'");
+			if(empty($info)){
+				continue;
+			}
+			$this->db->update("returngoods",['email' => $info['email']],['id' => $v['id']]) ;
+			usleep(20);
+		}
 		//$this->_ttexpress();
 		exit('No direct script access allowed');
 		if($arg == 'dayin')