|
@@ -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
|
|
|
}
|