Browse Source

Merge branch 'feature/eta2.2.6_material' into debug

xyxie 4 months ago
parent
commit
9e75687d94
1 changed files with 2 additions and 2 deletions
  1. 2 2
      models/material/material.go

+ 2 - 2
models/material/material.go

@@ -211,14 +211,14 @@ func GetMaterialInfoCountByClassifyIds(classifyIds []string) (count int, err err
 
 func GetMaterialByNames(materialNames []string) (items []*Material, err error) {
 	o := orm.NewOrmUsingDB("rddp")
-	sql := `SELECT * FROM material WHERE material_name in (` + utils.GetOrmInReplace(len(materialNames)) + `) limit 1`
+	sql := `SELECT * FROM material WHERE material_name in (` + utils.GetOrmInReplace(len(materialNames)) + `)`
 	_, err = o.Raw(sql, materialNames).QueryRows(&items)
 	return
 }
 
 func GetMaterialByNameEns(materialNames []string) (items []*Material, err error) {
 	o := orm.NewOrmUsingDB("rddp")
-	sql := `SELECT * FROM material WHERE material_name_en in (` + utils.GetOrmInReplace(len(materialNames)) + `) limit 1`
+	sql := `SELECT * FROM material WHERE material_name_en in (` + utils.GetOrmInReplace(len(materialNames)) + `)`
 	_, err = o.Raw(sql, materialNames).QueryRows(&items)
 	return
 }