Explorar el Código

feed_template: 饲喂配方模板

Yi hace 1 año
padre
commit
a2a30cfb7e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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 {