package models import "github.com/beego/beego/v2/client/orm" func GetLongzhonginfoByClassifyId(classifyId int) (items []*Longzhonginfo, err error) { sql := `SELECT * FROM longzhonginfo WHERE classify_id=? ORDER BY longzhonginfo_id ASC ` o := orm.NewOrmUsingDB("edb") _, err = o.Raw(sql, classifyId).QueryRows(&items) return } func GetLongzhongpriceinfoByClassifyName(productName string) (items []*Longzhongpriceinfo, err error) { sql := `SELECT * FROM longzhongpriceinfo WHERE product_name=? ORDER BY longzhongpriceinfo_id ASC ` o := orm.NewOrmUsingDB("edb") _, err = o.Raw(sql, productName).QueryRows(&items) return }