fix(withdraw):修正撤回管理中嵌套查询的问题。

This commit is contained in:
徐涛 2022-09-19 14:40:05 +08:00
parent cafed0c7f0
commit d98e782f12

View File

@ -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)