更新商品查询 条件
This commit is contained in:
parent
3621c9183d
commit
d031167b4d
@ -143,13 +143,13 @@ class StoreSpu extends BaseController
|
|||||||
]);
|
]);
|
||||||
if ($where['action']) unset($where['product_type']);
|
if ($where['action']) unset($where['product_type']);
|
||||||
$currentMerchant = Db::name('merchant')->where('mer_id',$id)->field('category_id,street_id')->find();
|
$currentMerchant = Db::name('merchant')->where('mer_id',$id)->field('category_id,street_id')->find();
|
||||||
$typeTownSupplyChainId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeTownSupplyChain'])->value('mer_type_id');
|
$typeCloudWarehouseId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeCloudWarehouse'])->value('mer_type_id');
|
||||||
$mer_id = Db::name('merchant')
|
$mer_id = Db::name('merchant')
|
||||||
->where('street_id',$currentMerchant['street_id'])
|
->where('street_id',$currentMerchant['street_id'])
|
||||||
->where('mer_state',1)
|
->where('mer_state',1)
|
||||||
->where('status',1)
|
->where('status',1)
|
||||||
->where('category_id',$currentMerchant['category_id'])
|
->where('category_id',$currentMerchant['category_id'])
|
||||||
->where('type_id', $typeTownSupplyChainId)
|
->where('type_id', $typeCloudWarehouseId)
|
||||||
->value('mer_id');
|
->value('mer_id');
|
||||||
if (!$mer_id) {
|
if (!$mer_id) {
|
||||||
return app('json')->success(['count'=>0,'list'=>[]]);
|
return app('json')->success(['count'=>0,'list'=>[]]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user