Commit 1a4b5021 authored by hangjun83's avatar hangjun83

openapi 震坤行

parent 903ac684
......@@ -185,23 +185,22 @@ class RhawnOrdersService
$tempSku = [];
foreach($orderDetail['lines'] as $line){
$tempSku[] = $line['zkhSku'];
}
if(!empty($tempSku)){
if(!empty($tempSku)) {
//获取对应关系
$goods = $dbConnect->table('zkh_goods')
->whereIn('zg_sku',$tempSku)
->where('zg_sku', $line['zkhSku'])
->get()->toArray();
if(count($goods) > 0){
if (count($goods) > 0) {
$pIds = [];
foreach($goods as $goodsInfo){
foreach ($goods as $goodsInfo) {
$pIds[] = $goodsInfo->zg_r_pid;
}
if(!empty($pIds)){
if (!empty($pIds)) {
$products = $dbConnect->table('products')
->whereIn('p_id',$pIds)
->whereIn('p_id', $pIds)
->get()->toArray();
if($products){
foreach($products as $key => $product){
if ($products) {
foreach ($products as $key => $product) {
$orderItemsArray = [];
$orderItemsArray['so_id'] = $orderId;
$orderItemsArray['p_id'] = $product->p_id;
......@@ -222,6 +221,7 @@ class RhawnOrdersService
}
}
}
}
if($data['express'] > 0){
$soitems = [];
$soitems_count = count($products);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment