Commit 8b45881e authored by hangjun83's avatar hangjun83

乐妍]

parent 36c467d7
...@@ -118,11 +118,11 @@ class LeyanService ...@@ -118,11 +118,11 @@ class LeyanService
->where('b_id', $bId) ->where('b_id', $bId)
->update(['p_status' => 0, 'p_show' => 0, 'modifytime' => time()]); ->update(['p_status' => 0, 'p_show' => 0, 'modifytime' => time()]);
foreach($product as $item){ foreach($product['productStockPrices'] as $package){
$p_tod = '无货,请咨询'; $p_tod = '无货,请咨询';
$status = 0; $status = 0;
if(!empty($item['productStockInfos'])){ if(!empty($package['productStockInfos'])){
foreach($item['productStockInfos'] as $stock){ foreach($package['productStockInfos'] as $stock){
if ($stock['city'] == '上海' && $stock['number'] > 0) { if ($stock['city'] == '上海' && $stock['number'] > 0) {
$p_tod = '现货'; $p_tod = '现货';
$status = 1; $status = 1;
...@@ -130,9 +130,8 @@ class LeyanService ...@@ -130,9 +130,8 @@ class LeyanService
} }
} }
} }
foreach($item['productStockPrices'] as $package){
$p_code = $item['catalogNo'] . '-' . $package['size']; $p_code = $product['catalogNo'] . '-' . $package['size'];
$productRow = $dbConnect->table('products') $productRow = $dbConnect->table('products')
->where('b_id', $bId) ->where('b_id', $bId)
...@@ -184,7 +183,6 @@ class LeyanService ...@@ -184,7 +183,6 @@ class LeyanService
$id = $productRow->p_id; $id = $productRow->p_id;
} }
} }
}
SimpleLogs::writeLog('Leyan p_id : '.$id.' cas : '.$chemicalsRow->c_cas. ' 更新成功,更新时间:'.date('Y-m-d H:i:s',time()),__CLASS__.':storeLeyanProducts'); SimpleLogs::writeLog('Leyan p_id : '.$id.' cas : '.$chemicalsRow->c_cas. ' 更新成功,更新时间:'.date('Y-m-d H:i:s',time()),__CLASS__.':storeLeyanProducts');
} }
......
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