model/masterOrder.go
@@ -57,11 +57,11 @@ } if key == "client_name" { db = db.Joins("Client").Where("client.name = ?", v) db = db.Joins("Client").Where("Client.name = ?", v) } if key == "member_name" { db = db.Joins("User").Where("User.username = ?", v) db = db.Joins("Member").Where("Member.username = ?", v) } case int: case float64: @@ -131,3 +131,7 @@ slf.SearchMap = searchMap return slf } func (slf *MasterOrderSearch) SetIds(ids []int) *MasterOrderSearch { slf.Orm = slf.Orm.Where("id in (?)", ids) return slf }