shop-example/pkg/redistab/redis_key.go
2023-08-13 11:55:20 +08:00

31 lines
662 B
Go

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)
}