liujiandao
2023-11-14 e095ef6b1d80cd361d9e1478bd86f00b28063996
service/test/product.go
@@ -56,7 +56,7 @@
   // 如果有条件搜索 下方会自动创建搜索语句
   //搜索框合一添加查询条件
   if info.Keyword != "" {
      db = db.Where("Product.name LIKE ?", "%"+info.Keyword+"%").Joins("Supplier").Or("Supplier.name LIKE ?", "%"+info.Keyword+"%")
      db = db.Where("srm_product.name LIKE ?", "%"+info.Keyword+"%").Joins("srm_supplier").Or("srm_supplier.name LIKE ?", "%"+info.Keyword+"%")
   }
   if info.StartCreatedAt != nil && info.EndCreatedAt != nil {
      db = db.Where("created_at BETWEEN ? AND ?", info.StartCreatedAt, info.EndCreatedAt)
@@ -100,7 +100,7 @@
   }
   if info.SupplierNumber != "" {
      db = db.Joins("Supplier").Where("Supplier.number LIKE ?", "%"+info.SupplierNumber+"%")
      db = db.Joins("srm_supplier").Where("srm_supplier.number LIKE ?", "%"+info.SupplierNumber+"%")
   }
   if info.DeliveryTime != 0 {