调整店铺内云商品查询
This commit is contained in:
parent
dbf8ab42f5
commit
5be47b6a30
@ -1325,6 +1325,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|||||||
'integral' => $cart['integral'] ? bcdiv($cart['integral']['use'], $cart['cart_num'], 0) : 0,
|
'integral' => $cart['integral'] ? bcdiv($cart['integral']['use'], $cart['cart_num'], 0) : 0,
|
||||||
'integral_total' => $cart['integral'] ? $cart['integral']['use'] : 0,
|
'integral_total' => $cart['integral'] ? $cart['integral']['use'] : 0,
|
||||||
'product_type' => $cart['product_type'],
|
'product_type' => $cart['product_type'],
|
||||||
|
'source_mer_id' => $cart['source'] == StoreCartDao::SOURCE_CLOUD ? $cart['source_id'] : 0,
|
||||||
'cart_info' => json_encode($order_cart)
|
'cart_info' => json_encode($order_cart)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -90,12 +90,12 @@ class StoreSpu extends BaseController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO 镇云仓库商户的商品搜索列表
|
* TODO 镇云仓库商户的商品搜索列表
|
||||||
* @param $id
|
* @param int $id
|
||||||
* @return mixed
|
* @return mixed
|
||||||
* @author Qinii
|
* @author Qinii
|
||||||
* @day 12/24/20
|
* @day 12/24/20
|
||||||
*/
|
*/
|
||||||
public function cloudMerProductLst($id)
|
public function cloudMerProductLst(int $id)
|
||||||
{
|
{
|
||||||
[$page, $limit] = $this->getPage();
|
[$page, $limit] = $this->getPage();
|
||||||
$where = $this->request->params([
|
$where = $this->request->params([
|
||||||
@ -103,10 +103,18 @@ class StoreSpu extends BaseController
|
|||||||
]);
|
]);
|
||||||
if ($where['action']) unset($where['product_type']);
|
if ($where['action']) unset($where['product_type']);
|
||||||
$category_id=Db::name('merchant')->where('mer_id',$id)->value('category_id');
|
$category_id=Db::name('merchant')->where('mer_id',$id)->value('category_id');
|
||||||
$mer_id=Db::name('merchant')->where('mer_state',1)->where('status',1)->where('category_id',$category_id)->where('type_id',Merchant::TypeCloudWarehouse)->value('mer_id');
|
$streetId = Db::name('merchant_address')->where('mer_id', $id)->value('street_id');
|
||||||
|
$mer_id=Db::name('merchant')
|
||||||
|
->alias('m')
|
||||||
|
->leftJoin('merchant_address ma', 'm.mer_id=ma.mer_id')
|
||||||
|
->where('street_id',$streetId)
|
||||||
|
->where('mer_state',1)
|
||||||
|
->where('m.status',1)
|
||||||
|
->where('category_id',$category_id)
|
||||||
|
->where('type_id',Merchant::TypeCloudWarehouse)
|
||||||
|
->value('m.mer_id');
|
||||||
if (!$mer_id){
|
if (!$mer_id){
|
||||||
return app('json')->success(['count'=>0,'list'=>[]]);
|
return app('json')->success(['count'=>0,'list'=>[]]);
|
||||||
|
|
||||||
}
|
}
|
||||||
$where['mer_id'] = $mer_id;
|
$where['mer_id'] = $mer_id;
|
||||||
$where['entry_mer_id'] = $id;
|
$where['entry_mer_id'] = $id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user