Merge pull request 'feat-IRONFANS-231-Robin' (#769) from feat-IRONFANS-231-Robin into test

Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/769
This commit is contained in:
chenhao 2024-10-22 15:53:56 +08:00
commit bd8652f824
2 changed files with 2 additions and 0 deletions

View File

@ -62,6 +62,7 @@ type ApiCountReq struct {
type ApiCountData struct {
VisitCount int64 `json:"visit_count" bson:"visit_count"`
PaidCount int64 `json:"paid_count" bson:"paid_count"`
TotalCount int64 `json:"total_count" bson:"total_count"`
}
type ApiCountResp struct {

View File

@ -35,6 +35,7 @@ func ApiGetRavenIQTestVisitCount(ctx *gin.Context) {
data := &Raven_IQ_test_visitproto.ApiCountData{
VisitCount: countMap[consts.RavenIQTest_VType_Visit],
PaidCount: countMap[consts.RavenIQTest_VType_Paid],
TotalCount: countMap[consts.RavenIQTest_VType_Visit] + countMap[consts.RavenIQTest_VType_Paid],
}
ReplyOk(ctx, data)