|
@@ -129,7 +129,7 @@ class Orders extends Api{
|
|
|
// 判断限购数量
|
|
|
$total = $buyNum[$buyInfo['product_id']] + $total;
|
|
|
// 如果超过数量
|
|
|
- if( $total > $productInfo['quota'] ) return json_send(['code'=>'error','msg'=>'限购'.$productInfo['quota'].'套-'.$productInfo['product_name'],'data'=>['error'=>'已超限=>'.($total - $productInfo['quota'])]]);
|
|
|
+ if( $total > $productInfo['quota'] ) return json_send(['code'=>'error','msg'=>'限购'.$productInfo['quota'].'单-'.$productInfo['product_name'],'data'=>['error'=>'已超限=>'.($total - $productInfo['quota'])]]);
|
|
|
}
|
|
|
}
|
|
|
// 如果存在SKU
|
|
@@ -145,7 +145,7 @@ class Orders extends Api{
|
|
|
// 如果购买数量小于最低起购数量
|
|
|
if( $buyInfo['buy_num'] < $skuInfo['min_quota'] ){
|
|
|
// 如果超过数量
|
|
|
- return json_send(['code'=>'error','msg'=>'最少购买'.$skuInfo['min_quota'].'套-'.$productInfo['product_name'].'【'.$skuInfo['sku_attr_names'].'】','data'=>['error'=>'最少购买'.$skuInfo['min_quota'].'套-'.$productInfo['product_name']]]);
|
|
|
+ return json_send(['code'=>'error','msg'=>'最少购买'.$skuInfo['min_quota'].'单-'.$productInfo['product_name'].'【'.$skuInfo['sku_attr_names'].'】','data'=>['error'=>'最少购买'.$skuInfo['min_quota'].'单-'.$productInfo['product_name']]]);
|
|
|
}
|
|
|
}
|
|
|
// 如果SKU限购
|
|
@@ -157,7 +157,7 @@ class Orders extends Api{
|
|
|
// 判断限购数量
|
|
|
$total = $buyInfo['buy_num'] + $total;
|
|
|
// 如果超过数量
|
|
|
- if( $total > $skuInfo['quota'] ) return json_send(['code'=>'error','msg'=>'限购'.$skuInfo['quota'].'套-'.$productInfo['product_name'].'【'.$skuInfo['sku_attr_names'].'】','data'=>['error'=>'已超限=>'.($total - $skuInfo['quota'])]]);
|
|
|
+ if( $total > $skuInfo['quota'] ) return json_send(['code'=>'error','msg'=>'限购'.$skuInfo['quota'].'单-'.$productInfo['product_name'].'【'.$skuInfo['sku_attr_names'].'】','data'=>['error'=>'已超限=>'.($total - $skuInfo['quota'])]]);
|
|
|
}
|
|
|
}
|
|
|
// 删除起购字段,避免影响后续产品最低起购的判定
|
|
@@ -172,7 +172,7 @@ class Orders extends Api{
|
|
|
// 如果购买数量小于最低起购数量
|
|
|
if( $buyNum[$buyInfo['product_id']] < $productInfo['min_quota'] ){
|
|
|
// 如果超过数量
|
|
|
- return json_send(['code'=>'error','msg'=>'最少购买'.$productInfo['min_quota'].'套-'.$productInfo['product_name'],'data'=>['error'=>'最少购买'.$productInfo['min_quota'].'套-'.$productInfo['product_name']]]);
|
|
|
+ return json_send(['code'=>'error','msg'=>'最少购买'.$productInfo['min_quota'].'单-'.$productInfo['product_name'],'data'=>['error'=>'最少购买'.$productInfo['min_quota'].'单-'.$productInfo['product_name']]]);
|
|
|
}
|
|
|
}
|
|
|
// 需要扣除的库存
|
|
@@ -732,7 +732,7 @@ class Orders extends Api{
|
|
|
// 判断限购数量
|
|
|
$total = $buyInfo['buy_num'] + $total;
|
|
|
// 如果超过数量
|
|
|
- if( $total > $productInfo['quota'] ) return json_send(['code'=>'error','msg'=>'限购'.$productInfo['quota'].'套-'.$productInfo['product_name'],'data'=>['error'=>'已超限=>'.($total - $productInfo['quota'])]]);
|
|
|
+ if( $total > $productInfo['quota'] ) return json_send(['code'=>'error','msg'=>'限购'.$productInfo['quota'].'单-'.$productInfo['product_name'],'data'=>['error'=>'已超限=>'.($total - $productInfo['quota'])]]);
|
|
|
}
|
|
|
}
|
|
|
// 需要扣除的库存
|