Selaa lähdekoodia

feed_template: 饲喂配方模板

Yi 1 vuosi sitten
vanhempi
commit
a2a30cfb7e
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      module/group.go

+ 1 - 1
module/group.go

@@ -551,7 +551,7 @@ func NewSearchFeedTemplateList(ctx context.Context, req *pasturePb.SearchFeedTem
 	res := make([]*models.FeedTemplate, 0)
 
 	if req.Name != "" {
-		DBSession.Where("name like '%?%'", req.Name)
+		DBSession.Where("name like ?", "%"+req.Name+"%")
 	}
 
 	if req.CattleCategoryId > 0 {