From ad354b218efb2dbe52a5a255550e72c747798d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Tue, 16 Aug 2022 00:03:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(park):=E5=A2=9E=E5=8A=A0=E7=94=A8=E4=BA=8E?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=9B=AD=E5=8C=BA=E5=BD=92=E5=B1=9E=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E6=B3=95=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- repository/park.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/repository/park.go b/repository/park.go index 4692d39..d9cf45c 100644 --- a/repository/park.go +++ b/repository/park.go @@ -35,3 +35,7 @@ func (_ParkRepository) FetchParkDetail(pid string) (*model.Park, error) { } return park, nil } + +func (_ParkRepository) EnsurePark(uid, pid string) (bool, error) { + return global.DBConn.Table(&model.Park{}).Where(builder.Eq{"user_id": uid, "id": pid}).Exist() +}