51 lines
1.0 KiB
Go
51 lines
1.0 KiB
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 GetProductIdSet() string {
|
|
return fmt.Sprintf("product:id:set")
|
|
}
|
|
|
|
func GetProductIdZet() string {
|
|
return fmt.Sprintf("product:id:zset")
|
|
}
|
|
|
|
func GetProductDetailLogCount(productId uint) string {
|
|
return fmt.Sprintf("product:log_count:%d", productId)
|
|
}
|
|
|
|
//某个商品的锁
|
|
func GetProductLockRedisKey(productId uint) string {
|
|
return fmt.Sprintf("product:lock:%d", productId)
|
|
}
|
|
|
|
//某个商品的锁
|
|
func GetChannelKey() string {
|
|
return fmt.Sprintf("product:channel" )
|
|
}
|
|
|
|
|