From d98e782f1240dbe5d695bb4c23246b7ea64a2ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Mon, 19 Sep 2022 14:40:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(withdraw):=E4=BF=AE=E6=AD=A3=E6=92=A4?= =?UTF-8?q?=E5=9B=9E=E7=AE=A1=E7=90=86=E4=B8=AD=E5=B5=8C=E5=A5=97=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/withdraw.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/service/withdraw.go b/service/withdraw.go index e9a2be2..dfb5066 100644 --- a/service/withdraw.go +++ b/service/withdraw.go @@ -71,9 +71,7 @@ func (_WithdrawService) FetchPagedWithdrawApplies(page int, keyword string) ([]m conditions = make([]string, 0) reports = make([]model.Report, 0) cond = global.DB.NewSelect().Model(&reports). - Relation("Park", func(q *bun.SelectQuery) *bun.SelectQuery { - return q.Relation("Enterprise") - }) + Relation("Park").Relation("Park.Enterprise") ) conditions = append(conditions, strconv.Itoa(int(model.REPORT_WITHDRAW_APPLIED)), strconv.Itoa(page)) cond = cond.Where("r.withdraw = ?", model.REPORT_WITHDRAW_APPLIED)