Selaa lähdekoodia

fix:归属于权益账户的需要额外申请

Roc 3 vuotta sitten
vanhempi
commit
abdde67326
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      models/tables/company_product/query.go

+ 2 - 2
models/tables/company_product/query.go

@@ -8,13 +8,13 @@ import (
 
 
 // GetByCompany2ProductId 根据客户id和产品id获取信息
 // GetByCompany2ProductId 根据客户id和产品id获取信息
 func GetByCompany2ProductId(companyId, productId int64) (item *CompanyProduct, err error) {
 func GetByCompany2ProductId(companyId, productId int64) (item *CompanyProduct, err error) {
-	err = global.DEFAULT_MYSQL.Where("company_id = ? and product_id", companyId, productId).First(&item).Error
+	err = global.DEFAULT_MYSQL.Where("company_id = ? and product_id=?", companyId, productId).First(&item).Error
 	return
 	return
 }
 }
 
 
 // GetListByCompanyId 根据客户id获取所有的产品信息列表
 // GetListByCompanyId 根据客户id获取所有的产品信息列表
 func GetListByCompanyId(companyId int64) (items []*CompanyProduct, err error) {
 func GetListByCompanyId(companyId int64) (items []*CompanyProduct, err error) {
-	err = global.DEFAULT_MYSQL.Where("company_id = ? and product_id", companyId).Find(&items).Error
+	err = global.DEFAULT_MYSQL.Where("company_id = ? ", companyId).Find(&items).Error
 	return
 	return
 }
 }