Ver código fonte

fix:redis缓存修改

duxin 2 anos atrás
pai
commit
93ab70a760
1 arquivos alterados com 3 adições e 4 exclusões
  1. 3 4
      src/jfw/jyutil/classroomiInfo.go

+ 3 - 4
src/jfw/jyutil/classroomiInfo.go

@@ -102,7 +102,7 @@ func ActivityInit() interface{} {
 			Key:   g.Cfg().MustGet(ctx, "activityKey").String(),
 		},
 	}))
-	redis.Del("other", "lotteryArray_jySchool")
+	redis.Del("other", "lotteryArray")
 	resp, err := Activity.GetAllLottery(context.Background(), &activity.Request{
 		AppId:       "10000",
 		ProductCode: "111",
@@ -121,7 +121,7 @@ func ActivityInit() interface{} {
 			}
 		}
 	}
-	redis.PutKV("lotteryArray_jySchool", lotteryMap)
+	redis.PutKV("lotteryArray", lotteryMap)
 	log.Println("活动rpc初始化完毕")
 	return true
 }
@@ -196,8 +196,7 @@ func Course(num, iType int) *[]map[string]interface{} {
 // 奖券详情
 func OptimalSelection(id string, price float64) (bool, float64) {
 	discountPrice := float64(0)
-	productStr := redis.Get("other", "lotteryArray_jySchool")
-	fmt.Println("333333333333", productStr)
+	productStr := redis.Get("other", "lotteryArray")
 	lotteryMap := &map[string]interface{}{}
 	if productStr != nil {
 		lotteryMap = util.ObjToMap(productStr)