更新哈心
This commit is contained in:
parent
1ef494997a
commit
65da437241
@ -281,8 +281,9 @@ class StoreProduct extends BaseController
|
||||
public function cloud_product_list(){
|
||||
[$page, $limit] = $this->getPage();
|
||||
$merchant = app()->make(MerchantRepository::class)->search(['mer_id' => $this->merId,])->find();
|
||||
$select=Db::name('cloud_product')->where('mer_id',$merchant['mer_id'])
|
||||
->page($page)->limit($limit)->select()->toArray();
|
||||
$product_ids=Db::name('cloud_product')->where('mer_id',$this->merId())
|
||||
->page($page)->limit($limit)->column('product_id');
|
||||
$select = Db::name('store_product')->where('mer_id', $this->merId())->whereIn('product_id',$product_ids)->select()->toArray();
|
||||
$count = Db::name('cloud_product')->where('mer_id',$merchant['mer_id'])->count();
|
||||
return app('json')->success(['list'=>$select,'count'=>$count]);
|
||||
}
|
||||
|
@ -454,8 +454,9 @@ class Product extends BaseController
|
||||
public function cloud_product_list(){
|
||||
[$page, $limit] = $this->getPage();
|
||||
|
||||
$select=Db::name('cloud_product')->where('mer_id',$this->request->merId())
|
||||
->page($page)->limit($limit)->select()->toArray();
|
||||
$product_ids=Db::name('cloud_product')->where('mer_id',$this->request->merId())
|
||||
->page($page)->limit($limit)->column('product_id');
|
||||
$select = Db::name('store_product')->where('mer_id', $this->request->merId())->whereIn('product_id',$product_ids)->select()->toArray();
|
||||
$count = Db::name('cloud_product')->where('mer_id',$this->request->merId())->count();
|
||||
return app('json')->success(['list'=>$select,'count'=>$count]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user