This commit is contained in:
shengchanzhe 2023-12-23 15:34:38 +08:00
parent 0d744027c9
commit 9a822e6267
2 changed files with 4 additions and 4 deletions

View File

@ -281,9 +281,9 @@ class StoreProduct extends BaseController
public function cloud_product_list(){ public function cloud_product_list(){
[$page, $limit] = $this->getPage(); [$page, $limit] = $this->getPage();
$merchant = app()->make(MerchantRepository::class)->search(['mer_id' => $this->merId,])->find(); $merchant = app()->make(MerchantRepository::class)->search(['mer_id' => $this->merId,])->find();
$select=Db::name('store_product_cloud')->where('mer_id',$merchant['mer_id']) $select=Db::name('cloud_product')->where('mer_id',$merchant['mer_id'])
->page($page)->limit($limit)->select()->toArray(); ->page($page)->limit($limit)->select()->toArray();
$count = Db::name('store_product_cloud')->where('mer_id',$merchant['mer_id'])->count(); $count = Db::name('cloud_product')->where('mer_id',$merchant['mer_id'])->count();
return app('json')->success(['list'=>$select,'count'=>$count]); return app('json')->success(['list'=>$select,'count'=>$count]);
} }
} }

View File

@ -454,9 +454,9 @@ class Product extends BaseController
public function cloud_product_list(){ public function cloud_product_list(){
[$page, $limit] = $this->getPage(); [$page, $limit] = $this->getPage();
$select=Db::name('store_product_cloud')->where('mer_id',$this->request->merId()) $select=Db::name('cloud_product')->where('mer_id',$this->request->merId())
->page($page)->limit($limit)->select()->toArray(); ->page($page)->limit($limit)->select()->toArray();
$count = Db::name('store_product_cloud')->where('mer_id',$this->request->merId())->count(); $count = Db::name('cloud_product')->where('mer_id',$this->request->merId())->count();
return app('json')->success(['list'=>$select,'count'=>$count]); return app('json')->success(['list'=>$select,'count'=>$count]);
} }