|
@@ -437,12 +437,12 @@ func GetCompanyProductItemListByCompanyIdList(companyIdList []int, productId int
|
|
|
// @param productId int
|
|
|
// @return items []*CompanyProductItem
|
|
|
// @return err error
|
|
|
-func GetCompanyProductItemByCompanyId(companyId int, productId int) (items *CompanyProductItem, err error) {
|
|
|
+func GetCompanyProductItemByCompanyId(companyId int, productId int) (item *CompanyProductItem, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `SELECT a.* FROM company_product as a
|
|
|
JOIN company b on a.company_id=b.company_id
|
|
|
WHERE a.company_id = ? AND a.product_id = ? `
|
|
|
- _, err = o.Raw(sql, companyId, productId).QueryRows(&items)
|
|
|
+ err = o.Raw(sql, companyId, productId).QueryRow(&item)
|
|
|
|
|
|
return
|
|
|
}
|