瀏覽代碼

Merge branch 'fix/bug' into debug

Roc 8 月之前
父節點
當前提交
dc59b1dde6
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      models/company/company_product.go

+ 2 - 2
models/company/company_product.go

@@ -655,12 +655,12 @@ type CompanyProductItem struct {
 // @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.*,b.is_share,b.share_seller,b.share_seller_id 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
 }