From 9eab11de11f6daed449392534b6fdccaf1b0b0a1 Mon Sep 17 00:00:00 2001 From: 陆恒 Date: Tue, 23 Jun 2020 16:27:29 +0800 Subject: [PATCH] 修复bug --- src/HttpServer/logic/httpserver.go | 5 ++++- src/HttpServer/logic/logic.go | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/HttpServer/logic/httpserver.go b/src/HttpServer/logic/httpserver.go index aa32aa2..052d9ec 100644 --- a/src/HttpServer/logic/httpserver.go +++ b/src/HttpServer/logic/httpserver.go @@ -60,10 +60,13 @@ func StartHttpTicker() { var tmp UserCaiPiaoHistory tmp.RewardNum = waits[k].RewardNum - tmp.CatId = 48 + cid := strconv.Itoa(waits[k].CurRound) + strconv.Itoa(waits[k].RewardNum) + tmp.CatId, _ = strconv.Atoi(cid) tmp.Round = waits[k].CurRound tmp.Cnum = vval.ChooseNum uinfo.CaiPiaoInfo = append(uinfo.CaiPiaoInfo, tmp) + + SaveUserInfo(uinfo, strconv.Itoa(val.List[randnum].UserId)) } } diff --git a/src/HttpServer/logic/logic.go b/src/HttpServer/logic/logic.go index 002cc5d..d550623 100644 --- a/src/HttpServer/logic/logic.go +++ b/src/HttpServer/logic/logic.go @@ -142,6 +142,7 @@ func HandlerSettlement(w http.ResponseWriter, data string, uuid int) { tmp.Round = rdata.Round tmp.Cnum = vval.ChooseNum uinfo.CaiPiaoInfo = append(uinfo.CaiPiaoInfo, tmp) + if vval.ChooseNum == tmp.RewardNum { rewarduser = vval.UserId @@ -154,6 +155,7 @@ func HandlerSettlement(w http.ResponseWriter, data string, uuid int) { } + SaveUserInfo(uinfo, strconv.Itoa(vval.UserId)) } var tmp AlreadyDuboCatList -- libgit2 0.21.0