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)