This commit is contained in:
toom1996
2026-08-30 22:50:33 +08:00
parent ec1ee702bd
commit c97a001a76
6 changed files with 217 additions and 0 deletions

View File

@ -40,6 +40,9 @@ func snapFilterScope(q dto.StreetSnapQuery) func(*gorm.DB) *gorm.DB {
if q.Year != 0 {
db = db.Where("year = ?", q.Year)
}
if q.City != "" {
db = db.Where("city = ?", q.City)
}
return db
}
}