Commit bf8feb78cf7dac2d0b54c2a134362cf8d231fe8f
1 parent
81bb2c2e
Exists in
master
提交
Showing
2 changed files
with
5 additions
and
11 deletions
Show diff stats
src/HttpServer/logic/function.go
@@ -43,17 +43,8 @@ func NewCaiPiaoRound(start, end, count, round int) { | @@ -43,17 +43,8 @@ func NewCaiPiaoRound(start, end, count, round int) { | ||
43 | curround.CurRound = round | 43 | curround.CurRound = round |
44 | curround.CurNum = 0 | 44 | curround.CurNum = 0 |
45 | curround.FakeNum = fakenum | 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 | redishandler.GetRedisClient().Delete(redis.CAIPIAOLEFTNUM_KEY) | 50 | redishandler.GetRedisClient().Delete(redis.CAIPIAOLEFTNUM_KEY) |
@@ -103,6 +94,7 @@ func GetCurCaiCatList() *CurDuboCatList { | @@ -103,6 +94,7 @@ func GetCurCaiCatList() *CurDuboCatList { | ||
103 | 94 | ||
104 | //设置当前彩池 | 95 | //设置当前彩池 |
105 | func SetCurCaiCatList(c *CurDuboCatList) { | 96 | func SetCurCaiCatList(c *CurDuboCatList) { |
97 | + logger.Info("SetCurCaiCatList") | ||
106 | savestr, err := json.Marshal(c) | 98 | savestr, err := json.Marshal(c) |
107 | if err != nil { | 99 | if err != nil { |
108 | logger.Error("SetCurCaiCatList err=%v", err) | 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,6 +1389,7 @@ func HandlerAutoChoose(w http.ResponseWriter, data string, uuid int) { | ||
1389 | tmp.UserId = uuid | 1389 | tmp.UserId = uuid |
1390 | curpool.List = append(curpool.List, tmp) | 1390 | curpool.List = append(curpool.List, tmp) |
1391 | curpool.CurNum = len(curpool.List) | 1391 | curpool.CurNum = len(curpool.List) |
1392 | + logger.Info("SetCurCaiCatList") | ||
1392 | SetCurCaiCatList(curpool) | 1393 | SetCurCaiCatList(curpool) |
1393 | //需要处理一下奖池是否满了 | 1394 | //需要处理一下奖池是否满了 |
1394 | fullnum := 199 | 1395 | fullnum := 199 |
@@ -1477,6 +1478,7 @@ func HandlerChooseNum(w http.ResponseWriter, data string, uuid int) { | @@ -1477,6 +1478,7 @@ func HandlerChooseNum(w http.ResponseWriter, data string, uuid int) { | ||
1477 | tmp.UserId = uuid | 1478 | tmp.UserId = uuid |
1478 | curpool.List = append(curpool.List, tmp) | 1479 | curpool.List = append(curpool.List, tmp) |
1479 | curpool.CurNum = len(curpool.List) | 1480 | curpool.CurNum = len(curpool.List) |
1481 | + logger.Info("SetCurCaiCatList") | ||
1480 | SetCurCaiCatList(curpool) | 1482 | SetCurCaiCatList(curpool) |
1481 | //需要处理一下奖池是否满了 | 1483 | //需要处理一下奖池是否满了 |
1482 | fullnum := 199 | 1484 | fullnum := 199 |