shop-example/pkg/redistab/redis_key.go

31 lines
662 B
Go
Raw Normal View History

2023-08-13 03:55:20 +00:00
package redistab
import "fmt"
//订单
func GetProductOrderList(productId uint) string {
return fmt.Sprintf("product:Order:%d", productId)
}
//已售数量
func GetProductSaleNum(productId uint) string {
return fmt.Sprintf("product:Sale:%d", productId)
}
//库存
func GetProductStockSize(productId uint) string {
return fmt.Sprintf("product:stock:%d", productId)
}
func GetProductDetail(productId uint) string {
return fmt.Sprintf("product:detail:%d", productId)
}
func GetProductBitMap() string {
return fmt.Sprintf("product:bitmap")
}
func GetProductDetailLogCount(productId uint) string {
return fmt.Sprintf("product:log_count:%d", productId)
}