From 92016d05e57bd1ce345c9b34917096f8bd125401 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Mon, 15 Jan 2024 15:10:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E5=85=91=E6=8D=A2?= =?UTF-8?q?=E7=AB=99=E7=82=B9=E6=94=AF=E6=8C=81=E9=BB=98=E8=AE=A4=E9=80=89?= =?UTF-8?q?=E4=B8=AD=E6=9F=90=E4=B8=AA=E7=AB=99=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/user/ExchangePickupPointRepository.php | 3 +++ app/controller/api/user/Exchange.php | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/common/repositories/user/ExchangePickupPointRepository.php b/app/common/repositories/user/ExchangePickupPointRepository.php index 454817c..02dfb71 100644 --- a/app/common/repositories/user/ExchangePickupPointRepository.php +++ b/app/common/repositories/user/ExchangePickupPointRepository.php @@ -49,6 +49,9 @@ class ExchangePickupPointRepository extends BaseRepository{ ->when(isset($params['is_show']) && $params['is_show'] !== '',function($query) use ($params){ $query->where('is_show',$params['is_show']); }) + ->when(isset($params['default_point_id']) && $params['default_point_id'] > 0,function($query) use ($params){ + $query->where('id',$params['default_point_id']); + }) ->when(!empty($params['address']),function($query) use ($params){ $query->where('address', "like", "%{$params['address']}%") ->whereOr('title','like',"%{$params['address']}%"); diff --git a/app/controller/api/user/Exchange.php b/app/controller/api/user/Exchange.php index 4bdeeea..cb93371 100644 --- a/app/controller/api/user/Exchange.php +++ b/app/controller/api/user/Exchange.php @@ -55,12 +55,11 @@ class Exchange extends BaseController{ * @return mixed */ public function getPointList(){ - $search = $this->request->params(['uid','address']); + $search = $this->request->params(['uid', 'address', 'default_point_id']); $search['is_show'] = 1; $data = app()->make(ExchangePickupPointRepository::class)->getList($search, 1, 30); $list = $data['list']; - return app('json')->success($list); } /**