线下提号增加搜索手机号

This commit is contained in:
yml2213
2026-07-27 13:39:52 +08:00
parent 66af387b4e
commit c86caeb667
3 changed files with 30 additions and 3 deletions
@@ -435,7 +435,13 @@ func (r *Repository) ListAdmin(ctx context.Context, query AdminPickupQuery) (*Pa
}
if kw := strings.TrimSpace(query.Keyword); kw != "" {
like := "%" + kw + "%"
db = db.Where("p.pickup_no LIKE ? OR l.listing_no LIKE ? OR a.title LIKE ?", like, like, like)
db = db.Where(
"p.pickup_no LIKE ? OR l.listing_no LIKE ? OR a.title LIKE ? OR owner.phone LIKE ?",
like,
like,
like,
like,
)
}
return r.paginatePickups(db, query.Page, query.PageSize, false)
}