更新状态查询
This commit is contained in:
parent
0b7f331877
commit
a0dd7e5b29
@ -10,7 +10,8 @@ class StoreMicro extends BaseController
|
||||
{
|
||||
function seach_bar_code($mer_id,$code='',$name=''){
|
||||
$category_id=Db::name('merchant')->where('mer_id',$mer_id)->value('category_id');
|
||||
$platformMerId = app()->make(MerchantDao::class)->getValidMerchant(['category_id' => $category_id, 'type_id' => Merchant::TypePlatform], 'mer_id')->value('mer_id');
|
||||
$typePlatformId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypePlatform'])->value('mer_type_id');
|
||||
$platformMerId = app()->make(MerchantDao::class)->getValidMerchant(['category_id' => $category_id, 'type_id' => $typePlatformId], 'mer_id')->value('mer_id');
|
||||
$productWhere = ['is_show' => 1, 'status' => 1, 'mer_status' => 1, 'is_del' => 0];
|
||||
if($code!=''){
|
||||
if (strlen($code) != 13) {
|
||||
|
@ -20,12 +20,13 @@ class ProductCreate
|
||||
return false;
|
||||
}
|
||||
$typeCloudWarehouseId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeCloudWarehouse'])->value('mer_type_id');
|
||||
if ($merchant['type_id'] == Merchant::TypePlatform || $merchant['type_id'] == $typeCloudWarehouseId) {
|
||||
$typePlatformId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypePlatform'])->value('mer_type_id');
|
||||
if ($merchant['type_id'] == $typePlatformId || $merchant['type_id'] == $typeCloudWarehouseId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//市级云仓
|
||||
$cityMerchant = Db::name('merchant')->where('status', 1)->where('mer_state', 1)->where('category_id', $merchant['category_id'])->where('type_id', Merchant::TypePlatform)->find();
|
||||
$cityMerchant = Db::name('merchant')->where('status', 1)->where('mer_state', 1)->where('category_id', $merchant['category_id'])->where('type_id', $typePlatformId)->find();
|
||||
if ($cityMerchant) {
|
||||
$where = ['mer_id' => $cityMerchant['mer_id'], 'is_del' => 0];
|
||||
if ($product['bar_code'] != '' && in_array($product['product_type'], [0, 98]) && $product['spec_type'] == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user