查询任务排行,新增游戏基本接口

This commit is contained in:
chy
2025-06-09 16:30:26 +08:00
parent 5ead851b99
commit a598a253a9
17 changed files with 409 additions and 0 deletions

View File

@ -0,0 +1,5 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package task

View File

@ -0,0 +1,15 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package task
import (
"server/api/task"
)
type ControllerV1 struct{}
func NewV1() task.ITaskV1 {
return &ControllerV1{}
}

View File

@ -0,0 +1,27 @@
package task
import (
"context"
"server/internal/model"
"server/internal/service"
"server/api/task/v1"
)
func (c *ControllerV1) Ranking(ctx context.Context, req *v1.RankingReq) (res *v1.RankingRes, err error) {
out, err := service.Task().UserTaskRankingList(ctx, &model.UserTaskRankingIn{
Page: req.Page,
Size: req.Size,
StoreId: req.StoreId,
Type: req.Type,
})
if err != nil {
return nil, err
}
return &v1.RankingRes{
List: out.List,
Total: out.Total,
}, nil
}