From 5e61da43a295f676915459e6fd0f419a58b6c9a0 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Mon, 15 Jan 2024 10:18:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E4=B9=B0=E5=8D=95?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../store/order/StoreOrderRepository.php | 1 + app/controller/api/store/order/OnlinePay.php | 14 +++++++++++++- route/api.php | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index 82f4f94..a288fee 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -2485,6 +2485,7 @@ class StoreOrderRepository extends BaseRepository $query->field('mer_id,mer_name,mer_avatar')->bind(['mer_name','mer_avatar']); }, ]) + ->where('activity_type',30) ->order('create_time DESC,order_id DESC'); $count = $query->count(); $list = $query->page($page,$limit)->select(); diff --git a/app/controller/api/store/order/OnlinePay.php b/app/controller/api/store/order/OnlinePay.php index 255a2d4..9f1d7fe 100644 --- a/app/controller/api/store/order/OnlinePay.php +++ b/app/controller/api/store/order/OnlinePay.php @@ -70,9 +70,21 @@ class OnlinePay extends BaseController{ return app('json')->status('error', $e->getMessage(), ['order_id' => $groupOrder->group_order_id]); } } + /** + * Common: 获取买单记录 + * Author: wu-hui + * Time: 2024/01/15 9:23 + * @return mixed + */ + public function getRecord(){ + $params = $this->request->params(['uid','mer_id']); + $params['uid'] = $this->request->uid(); + [$page, $limit] = $this->getPage(); + $data = app()->make(StoreOrderRepository::class)->getOnlineOrderList((array)$params,(int)$page,(int)$limit); - + return app('json')->success($data); + } } diff --git a/route/api.php b/route/api.php index c044117..9964aac 100644 --- a/route/api.php +++ b/route/api.php @@ -344,6 +344,7 @@ Route::group('api/', function () { Route::group('onlinePayment', function () { Route::get('searchMerList', 'OnlinePay/searchMer'); Route::get('createOrder', 'OnlinePay/createOrder'); + Route::get('record', 'OnlinePay/getRecord'); })->prefix('api.store.order.'); // 商品兑换 Route::group('exchange', function () {