Commit bf8feb78cf7dac2d0b54c2a134362cf8d231fe8f

Authored by 陆恒
1 parent 81bb2c2e
Exists in master

提交

src/HttpServer/logic/function.go
... ... @@ -43,17 +43,8 @@ func NewCaiPiaoRound(start, end, count, round int) {
43 43 curround.CurRound = round
44 44 curround.CurNum = 0
45 45 curround.FakeNum = fakenum
46   -
47   - savestr, err := json.Marshal(&curround)
48   - if err == nil {
49   -
50   - err = redishandler.GetRedisClient().SetString(redis.CAIPIAOKAIJIANGCURRENT_KEY, string(savestr))
51   - if err != nil {
52   - logger.Error("NewCaiPiaoRound err=%v", err)
53   - }
54   - } else {
55   - logger.Error("NewCaiPiaoRound err=%v", err)
56   - }
  46 + logger.Info("SetCurCaiCatList")
  47 + SetCurCaiCatList(&curround)
57 48  
58 49 //首先清楚原先的号码
59 50 redishandler.GetRedisClient().Delete(redis.CAIPIAOLEFTNUM_KEY)
... ... @@ -103,6 +94,7 @@ func GetCurCaiCatList() *CurDuboCatList {
103 94  
104 95 //设置当前彩池
105 96 func SetCurCaiCatList(c *CurDuboCatList) {
  97 + logger.Info("SetCurCaiCatList")
106 98 savestr, err := json.Marshal(c)
107 99 if err != nil {
108 100 logger.Error("SetCurCaiCatList err=%v", err)
... ...
src/HttpServer/logic/logic.go
... ... @@ -1389,6 +1389,7 @@ func HandlerAutoChoose(w http.ResponseWriter, data string, uuid int) {
1389 1389 tmp.UserId = uuid
1390 1390 curpool.List = append(curpool.List, tmp)
1391 1391 curpool.CurNum = len(curpool.List)
  1392 + logger.Info("SetCurCaiCatList")
1392 1393 SetCurCaiCatList(curpool)
1393 1394 //需要处理一下奖池是否满了
1394 1395 fullnum := 199
... ... @@ -1477,6 +1478,7 @@ func HandlerChooseNum(w http.ResponseWriter, data string, uuid int) {
1477 1478 tmp.UserId = uuid
1478 1479 curpool.List = append(curpool.List, tmp)
1479 1480 curpool.CurNum = len(curpool.List)
  1481 + logger.Info("SetCurCaiCatList")
1480 1482 SetCurCaiCatList(curpool)
1481 1483 //需要处理一下奖池是否满了
1482 1484 fullnum := 199
... ...