Sfoglia il codice sorgente

feed_template: 饲喂配方模板

Yi 1 anno fa
parent
commit
a2a30cfb7e
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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 {