Commit 753e81e7bcaa3ad43d732d229f24f806e8aa0fca
1 parent
de483a17
Exists in
master
提交
Showing
2 changed files
with
10 additions
and
4 deletions
Show diff stats
src/HttpServer/logic/httpserver.go
@@ -312,7 +312,7 @@ func GetMainPageInfo(w http.ResponseWriter, r *http.Request) { | @@ -312,7 +312,7 @@ func GetMainPageInfo(w http.ResponseWriter, r *http.Request) { | ||
312 | r.Body.Close() | 312 | r.Body.Close() |
313 | 313 | ||
314 | s := string(result) | 314 | s := string(result) |
315 | - logger.Info("GetMainPageInfo , body:%v,uuid=%v", s, Uuid) | 315 | + //logger.Info("GetMainPageInfo , body:%v,uuid=%v", s, Uuid) |
316 | 316 | ||
317 | HandlerGetMainPageInfo(w, s, Uuid) | 317 | HandlerGetMainPageInfo(w, s, Uuid) |
318 | } | 318 | } |
@@ -1086,7 +1086,7 @@ func GetUserData(w http.ResponseWriter, r *http.Request) { | @@ -1086,7 +1086,7 @@ func GetUserData(w http.ResponseWriter, r *http.Request) { | ||
1086 | r.Body.Close() | 1086 | r.Body.Close() |
1087 | 1087 | ||
1088 | s := string(result) | 1088 | s := string(result) |
1089 | - logger.Info("GetUserData , body:%v,uuid=%v", s, Uuid) | 1089 | + //logger.Info("GetUserData , body:%v,uuid=%v", s, Uuid) |
1090 | 1090 | ||
1091 | HandlerGetUserData(w, s, Uuid) | 1091 | HandlerGetUserData(w, s, Uuid) |
1092 | } | 1092 | } |
src/HttpServer/logic/logic.go
@@ -312,7 +312,13 @@ func HandlerGetUserData(w http.ResponseWriter, data string, uuid int) { | @@ -312,7 +312,13 @@ func HandlerGetUserData(w http.ResponseWriter, data string, uuid int) { | ||
312 | uinfo.Gold += addgold | 312 | uinfo.Gold += addgold |
313 | uinfo.GoldSum += addgold | 313 | uinfo.GoldSum += addgold |
314 | uinfo.AddToRank() | 314 | uinfo.AddToRank() |
315 | - resp.Data.Output = strconv.FormatInt(uinfo.Goldrate, 10) | 315 | + |
316 | + output := uinfo.Goldrate | ||
317 | + | ||
318 | + if uinfo.IsDouble == 1 { | ||
319 | + output = uinfo.Goldrate * 3 | ||
320 | + } | ||
321 | + resp.Data.Output = strconv.FormatInt(output, 10) | ||
316 | resp.Data.Coin = strconv.FormatInt(uinfo.Gold, 10) | 322 | resp.Data.Coin = strconv.FormatInt(uinfo.Gold, 10) |
317 | logger.Info("HandlerGetUserData addgold=%v", addgold) | 323 | logger.Info("HandlerGetUserData addgold=%v", addgold) |
318 | 324 | ||
@@ -499,7 +505,7 @@ func HandlerGetMainPageInfo(w http.ResponseWriter, data string, uuid int) { | @@ -499,7 +505,7 @@ func HandlerGetMainPageInfo(w http.ResponseWriter, data string, uuid int) { | ||
499 | //保存此次计算时间 | 505 | //保存此次计算时间 |
500 | nowtimestr := strconv.FormatInt(nowtime, 10) | 506 | nowtimestr := strconv.FormatInt(nowtime, 10) |
501 | redishandler.GetRedisClient().HSet(redis.USER_LAST_CALC_TIME, strconv.Itoa(uuid), nowtimestr) | 507 | redishandler.GetRedisClient().HSet(redis.USER_LAST_CALC_TIME, strconv.Itoa(uuid), nowtimestr) |
502 | - logger.Info("HandlerGetMainPageInfo save USER_LAST_CALC_TIME time=%v", nowtimestr) | 508 | + //logger.Info("HandlerGetMainPageInfo save USER_LAST_CALC_TIME time=%v", nowtimestr) |
503 | 509 | ||
504 | redlist := uinfo.GetRedCatIdList() | 510 | redlist := uinfo.GetRedCatIdList() |
505 | resp.Data.LimitCatList = append(resp.Data.LimitCatList, redlist...) | 511 | resp.Data.LimitCatList = append(resp.Data.LimitCatList, redlist...) |