印度包网
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
977 B

1 year ago
package guser
import (
"server/modules/backend/app"
"server/modules/backend/models"
utils "server/modules/backend/util"
"server/modules/backend/values"
"github.com/gin-gonic/gin"
)
func LostUserDetail(c *gin.Context) {
a := app.NewApp(c)
defer func() {
a.Response()
}()
req := new(values.LostUserDetailReq)
if !a.S(req) {
return
}
resp := values.LostUserDetailResp{}
a.Data = resp
}
func getLostUserDetail(uid int, gameId int) values.LostUserDetail {
var lostUserDetail values.LostUserDetail
lostUserDetail.GameId = gameId
isWin := true
winCount := models.GetWinGameCountByBalance(nil, nil, &uid, nil, &gameId, nil, &isWin)
lostUserDetail.GameCount = models.GetGameCountByBalance(nil, nil, &uid, nil, &gameId, nil)
lostUserDetail.WinPer = utils.GetPer(winCount, lostUserDetail.GameCount)
// lostUserDetail.BreakPer = utils.GetPer(models.GetPlayerBreakCount(nil, nil, &uid, &gameId, nil, nil), lostUserDetail.GameCount)
return lostUserDetail
}