Commit 1b8d5e18 by 杨树贤

redis

parent f3699e46
Showing with 4 additions and 4 deletions
...@@ -76,10 +76,10 @@ func (ls *LyService) GetSkuBatchFormat(sku *model.LySku) { ...@@ -76,10 +76,10 @@ func (ls *LyService) GetSkuBatchFormat(sku *model.LySku) {
} }
func (ls *LyService) getSupplierBatch(supplierId int64) []int { func (ls *LyService) getSupplierBatch(supplierId int64) []int {
redisCon := gredis.Conn("default_r") skuConn := gredis.Conn("default_r")
defer redisCon.Close() defer skuConn.Close()
info, err := redis.String(redisCon.Do("HGET", "SUPPLIER_REDIS_INFO_", supplierId)) info, err := redis.String(skuConn.Do("HGET", "SUPPLIER_REDIS_INFO_", supplierId))
if err != nil || info == "" { if err != nil || info == "" {
return nil return nil
} }
...@@ -106,7 +106,7 @@ func (ls *LyService) getSupplierBatch(supplierId int64) []int { ...@@ -106,7 +106,7 @@ func (ls *LyService) getSupplierBatch(supplierId int64) []int {
} }
func (ls *LyService) getSpotList(goodsId string) []model.Spot { func (ls *LyService) getSpotList(goodsId string) []model.Spot {
redisCon := gredis.Conn("default_r") redisCon := gredis.Conn("spu")
defer redisCon.Close() defer redisCon.Close()
skuSpotStr, err := redis.String(redisCon.Do("HGET", "sku_spot", goodsId)) skuSpotStr, err := redis.String(redisCon.Do("HGET", "sku_spot", goodsId))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment