|
@@ -163,7 +163,30 @@ class Product extends Base
|
|
|
if ($result) {
|
|
|
$result = collection($result)->toArray();
|
|
|
} else {
|
|
|
- $this->error('没有更多数据');
|
|
|
+ $this->success(1,[]);
|
|
|
+ }
|
|
|
+ $this->success('', $result);
|
|
|
+ }
|
|
|
+
|
|
|
+ //批发列表
|
|
|
+ public function pifa_lists(){
|
|
|
+ $page = $this->request->request('page', 1);
|
|
|
+ $pagesize = $this->request->request('listrow', 10);
|
|
|
+ $by = $this->request->request('by', 'weigh');
|
|
|
+ $desc = $this->request->request('desc', 'desc');
|
|
|
+
|
|
|
+ $result = Db::name('unishop_order_product')->alias('op')
|
|
|
+ ->join('unishop_order o','op.order_id = o.id','LEFT')
|
|
|
+ ->where(['o.status' => 1,'o.have_paid' => 1])
|
|
|
+ ->page($page, $pagesize)
|
|
|
+ ->order($by, $desc)
|
|
|
+ ->field('id,title,image,sales_price,sales,real_sales')
|
|
|
+ ->select();
|
|
|
+
|
|
|
+ if ($result) {
|
|
|
+ $result = collection($result)->toArray();
|
|
|
+ } else {
|
|
|
+ $this->success(1,[]);
|
|
|
}
|
|
|
$this->success('', $result);
|
|
|
}
|