|
@@ -56,6 +56,7 @@ class Apipf extends Start_Controller{
|
|
}
|
|
}
|
|
$hour = date("H");
|
|
$hour = date("H");
|
|
$minute = date("i");
|
|
$minute = date("i");
|
|
|
|
+ $this->db->query("update crowd_customer set more_three = 1 where num >= 5 and more_three = 0");
|
|
if($hour != 20){
|
|
if($hour != 20){
|
|
die("Execution conditions hour do not allow");
|
|
die("Execution conditions hour do not allow");
|
|
}
|
|
}
|
|
@@ -77,7 +78,7 @@ class Apipf extends Start_Controller{
|
|
if($api != $this->api){
|
|
if($api != $this->api){
|
|
die("No data to be executed");
|
|
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,5);
|
|
//$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);
|
|
//$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)){
|
|
if(empty($list)){
|
|
die("This is a request without data");
|
|
die("This is a request without data");
|
|
@@ -106,7 +107,6 @@ class Apipf extends Start_Controller{
|
|
];
|
|
];
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
if(empty($send_list)){
|
|
if(empty($send_list)){
|
|
die("There is no customer data to be synchronized");
|
|
die("There is no customer data to be synchronized");
|
|
}
|
|
}
|
|
@@ -195,18 +195,19 @@ class Apipf extends Start_Controller{
|
|
if(!$flag_jishu){
|
|
if(!$flag_jishu){
|
|
$tmp_type++;
|
|
$tmp_type++;
|
|
if(isset($quantity_arr[$key])){
|
|
if(isset($quantity_arr[$key])){
|
|
- if(is_numeric($quantity[$index])){
|
|
|
|
- $tmp_qty = $quantity_arr[$key] + $tmp_qty;
|
|
|
|
|
|
+ if(is_numeric($quantity_arr[$key])){
|
|
|
|
+ $tmp_qty = $quantity_arr[$key]*1 + $tmp_qty;
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
$tmp_qty = $tmp_qty + 1;
|
|
$tmp_qty = $tmp_qty + 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // if(isset($quantity_arr[$key])){
|
|
|
|
- // $jisuan_qty = $quantity_arr[$key]*1 + $jisuan_qty;
|
|
|
|
- // }else{
|
|
|
|
- // $jisuan_qty = $jisuan_qty + 1;
|
|
|
|
- // }
|
|
|
|
|
|
+ if(isset($quantity_arr[$key])){
|
|
|
|
+ $jisuan_qty = $quantity_arr[$key]*1 + $jisuan_qty;
|
|
|
|
+ }else{
|
|
|
|
+ $jisuan_qty = $jisuan_qty + 1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
if(!empty($product_arr[$key])){
|
|
if(!empty($product_arr[$key])){
|
|
$sku_list[] = [
|
|
$sku_list[] = [
|
|
@@ -239,6 +240,7 @@ class Apipf extends Start_Controller{
|
|
// var_dump($tmp_type);
|
|
// var_dump($tmp_type);
|
|
// var_dump($tmp_qty);
|
|
// var_dump($tmp_qty);
|
|
// var_dump("------------------");
|
|
// var_dump("------------------");
|
|
|
|
+ //var_dump($jisuan_qty);
|
|
$order_mount = $order_mount +$v['shouldmoney']*1;//订单总金额
|
|
$order_mount = $order_mount +$v['shouldmoney']*1;//订单总金额
|
|
$order_num++;//下单次数
|
|
$order_num++;//下单次数
|
|
$order_qty = $order_qty + $jisuan_qty;//订单产品总数
|
|
$order_qty = $order_qty + $jisuan_qty;//订单产品总数
|