소스 검색

商品规格更改返回

abiao 5 년 전
부모
커밋
1249540160
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      go/gopath/src/fohow.com/apps/models/product_model/product.go

+ 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