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.
68 lines
1.6 KiB
68 lines
1.6 KiB
|
2 months ago
|
package guser
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/gin-gonic/gin"
|
||
|
|
"github.com/liangdas/mqant/log"
|
||
|
|
"github.com/olivere/elastic/v7"
|
||
|
|
"server/common"
|
||
|
|
"server/db"
|
||
|
|
"server/modules/backend/values"
|
||
|
|
"server/modules/customer/app"
|
||
|
|
)
|
||
|
|
|
||
|
|
func GetGameUserPlayDetail(c *gin.Context) {
|
||
|
|
a := app.NewApp(c)
|
||
|
|
defer func() {
|
||
|
|
a.Response()
|
||
|
|
}()
|
||
|
|
req := new(values.GetGameUserPlayDetailReq)
|
||
|
|
if !a.S(req) {
|
||
|
|
return
|
||
|
|
}
|
||
|
|
|
||
|
|
data := common.CurrencyBalance{}
|
||
|
|
q := elastic.NewBoolQuery()
|
||
|
|
q.Filter(elastic.NewTermQuery("extern.keyword", req.UUID))
|
||
|
|
q.Filter(elastic.NewTermQuery("event", common.CurrencyEventGameSettle))
|
||
|
|
err := db.ES().QueryOne(common.ESIndexBalance, q, &data)
|
||
|
|
if err != nil {
|
||
|
|
log.Error("err:%v", err)
|
||
|
|
a.Code = values.CodeRetry
|
||
|
|
return
|
||
|
|
}
|
||
|
|
//gameId, err := strconv.Atoi(data.Desc)
|
||
|
|
//if err != nil {
|
||
|
|
// log.Error("err:%v", err)
|
||
|
|
// a.Code = values.CodeRetry
|
||
|
|
// return
|
||
|
|
//}
|
||
|
|
resp := values.GetGameUserPlayDetailResp{}
|
||
|
|
//resp.GameId = gameId
|
||
|
|
a.Data = resp
|
||
|
|
//if data.Desc == fmt.Sprintf("%d", common.GameIDDragon) || data.Desc == fmt.Sprintf("%d", common.GameIDSeven) {
|
||
|
|
// res, err := getDVTGameUserPlayDetail(req.UUID, req.UID)
|
||
|
|
// if err != nil {
|
||
|
|
// log.Error("查询百人模式游戏数据统计失败, error : [%s]", err.Error())
|
||
|
|
// a.Code = values.CodeRetry
|
||
|
|
// return
|
||
|
|
// }
|
||
|
|
// resp.Result = res
|
||
|
|
// a.Data = resp
|
||
|
|
//} else {
|
||
|
|
//
|
||
|
|
// if 2001 <= gameId && gameId < 3000 {
|
||
|
|
// Result, History := getESTeenpattiOperateLog(req.UUID)
|
||
|
|
// resp.Result = Result
|
||
|
|
// resp.History = History
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// if 3001 <= gameId && gameId < 4000 {
|
||
|
|
// Result, History := getESRummyOperateLog(req.UUID)
|
||
|
|
// resp.Result = Result
|
||
|
|
// resp.History = History
|
||
|
|
// }
|
||
|
|
//
|
||
|
|
// a.Data = resp
|
||
|
|
//}
|
||
|
|
}
|