|
@@ -114,7 +114,7 @@ class Apipf extends Start_Controller{
|
|
|
$data = [];
|
|
|
$customer_ids = [];
|
|
|
foreach($send_list as $item){
|
|
|
- if(empty($item['orders'])){
|
|
|
+ if(empty($item['orders']) || empty($item['email'])){
|
|
|
//直接同步更新了吧 都满足条件了 结果还没订单 就先不查询了 等有新的订单在判断一遍
|
|
|
$this->customer->save([
|
|
|
'more_three'=>3,
|
|
@@ -126,7 +126,7 @@ class Apipf extends Start_Controller{
|
|
|
$customer_ids[] = $item['customer_id'];
|
|
|
}
|
|
|
var_dump(json_encode($customer_ids));
|
|
|
- // var_dump($data);
|
|
|
+ //var_dump($data);
|
|
|
if(empty($data)){
|
|
|
return ;
|
|
|
}
|
|
@@ -148,7 +148,7 @@ class Apipf extends Start_Controller{
|
|
|
if($api != $this->api){
|
|
|
die("No data to be executed");
|
|
|
}
|
|
|
- $list = $this->customer->find_all("more_three = 3 and is_tb = 0","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 = 3 and is_tb = 0","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");
|
|
@@ -234,6 +234,7 @@ class Apipf extends Start_Controller{
|
|
|
|
|
|
$flag_jishu = true;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
//var_dump($flag_jishu);
|
|
|
if(!$flag_jishu){
|
|
@@ -250,11 +251,14 @@ class Apipf extends Start_Controller{
|
|
|
$jisuan_qty = $jisuan_qty + 1;
|
|
|
}
|
|
|
|
|
|
- $sku_list[] = [
|
|
|
- 'sku'=>$item,
|
|
|
- 'qty'=>isset($quantity_arr[$key])?$quantity_arr[$key]:1,
|
|
|
- 'product_name'=>isset($product_arr[$key])?$product_arr[$key]:"",
|
|
|
- ];
|
|
|
+ if(!empty($product_arr[$key])){
|
|
|
+ $sku_list[] = [
|
|
|
+ 'sku'=>$item,
|
|
|
+ 'qty'=>isset($quantity_arr[$key])?$quantity_arr[$key]:1,
|
|
|
+ 'product_name'=>isset($product_arr[$key])?$product_arr[$key]:"",
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
$goods_list = [];
|
|
|
$fpdata_arr = explode(";",trim($v['fpdata'],";"));
|