abiao 5 роки тому
батько
коміт
1249540160

+ 2 - 2
go/gopath/src/fohow.com/apps/models/product_model/product.go

@@ -329,7 +329,7 @@ func GetProductByIdAndSizeAndColor(id, sizeId, colorId int64, useCache bool) *Pr
 
 //根据商品 relate_Id 跟 sizeId,获取商品信息
 func GetProductByIdAndSizeId(relateId, sizeId int64, useCache bool) *Product {
-	k := fmt.Sprintf("product_model.GetProductByIdAndSizeId[%d]", relateId)
+	k := fmt.Sprintf("product_model.GetProductByRelateId[%d]SizeId[%d]", relateId, sizeId)
 	if useCache {
 		if v, ok := cache.Cache.Get(k).(*Product); ok {
 			return v
@@ -348,7 +348,7 @@ func GetProductByIdAndSizeId(relateId, sizeId int64, useCache bool) *Product {
 
 //根据商品 relate_Id 跟 colorId,获取商品信息
 func GetProductByIdAndColorId(relateId, colorId int64, useCache bool) *Product {
-	k := fmt.Sprintf("product_model.GetProductByIdAndColorId[%d]", relateId)
+	k := fmt.Sprintf("product_model.GetProductByRelateId[%d]ColorId[%d]", relateId, colorId)
 	if useCache {
 		if v, ok := cache.Cache.Get(k).(*Product); ok {
 			return v