更新云仓库

This commit is contained in:
mkm 2023-11-02 10:06:35 +08:00
parent f1c8ad8c8f
commit 708851db26

View File

@ -25,6 +25,15 @@ class ProductCreate
return false; return false;
} }
//查询市级供应链
$mer = Db::name('merchant')->where('status', 1)->where('mer_state', 1)->where('category_id', $merchant['category_id'])->where('type_id',Merchant::TypeSupplyChain)->value('mer_id');
if($mer==null){
return false;
}
$product_id=Db::name('store_product')->where('mer_id',$mer)->where('bar_code', $product['bar_code'])->value('id');
if($product_id==null){
return false;
}
// 根据支持同步到云商的商户进行同步操作 // 根据支持同步到云商的商户进行同步操作
$syncMerArray = Db::name('MerchantType')->where('is_sync_prod', 1)->column('mer_type_id'); $syncMerArray = Db::name('MerchantType')->where('is_sync_prod', 1)->column('mer_type_id');
if (!in_array($merchant['type_id'], $syncMerArray)) { if (!in_array($merchant['type_id'], $syncMerArray)) {