longyi 5 months ago
parent
commit
c733b68415
1 changed files with 5 additions and 4 deletions
  1. 5 4
      core/CoreApp/controllers/Apipf.php

+ 5 - 4
core/CoreApp/controllers/Apipf.php

@@ -77,7 +77,7 @@ class Apipf extends Start_Controller{
        if($api != $this->api){
             die("No data to be executed");
        }
-       $list = $this->customer->find_all("more_three = 1","id,shop,source,name,email,phone,money,num,country,province,city,street,address,address2,zipcode",'id asc',0,100);
+       $list = $this->customer->find_all("more_three = 1","id,shop,source,name,email,phone,money,num,country,province,city,street,address,address2,zipcode",'id asc',0,3);
        //$list = $this->customer->find_all("id = 71015","id,shop,source,name,email,phone,money,num,country,province,city,street,address,address2,zipcode",'id asc',0,100);
        if(empty($list)){
            die("This is a request without data");  
@@ -175,13 +175,14 @@ class Apipf extends Start_Controller{
         die;
         foreach($send_list as $item){
             if(empty($item['orders'])){
-                
+                 $this->customer->save([
+                     'is_tb'=>1,
+                 ],$item['customer_id']);
                 continue;
             }
              $res = $this->sendHttp($url,$header,$item);
              if($res){
                  $this->customer->save([
-                     'more_three'=>3,
                      'is_tb'=>1,
                  ],$item['customer_id']);
              }
@@ -328,7 +329,7 @@ class Apipf extends Start_Controller{
             ];
         }
         return [
-            'ordered_mount'=>$order_mount,
+            'order_mount'=>$order_mount,
             'order_num'=>$order_num,
             'order_qty'=>$order_qty,
             'orders'=>$final_list,