liujiandao
2024-04-12 efbe2bd4bbc6444dad4ab5fe8d7e839c38230805
models/location_product_amount.go
@@ -36,6 +36,7 @@
      LocationIds []int
      ProductIds  []string
      Ids         []int
      Query       string
   }
   LocationProductAmountWithOperation struct {
@@ -119,6 +120,11 @@
   return slf
}
func (slf *LocationProductAmountSearch) SetQuery(query string) *LocationProductAmountSearch {
   slf.Query = query
   return slf
}
func (slf *LocationProductAmountSearch) build() *gorm.DB {
   var db = slf.Orm.Model(&LocationProductAmount{})
@@ -163,6 +169,10 @@
      db = db.Where("id in (?)", slf.Ids)
   }
   if slf.Query != "" {
      db = db.Where(slf.Query)
   }
   return db
}