调整奖励类型和奖励
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
package task
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"server/internal/model"
|
||||
"server/internal/service"
|
||||
|
||||
"server/api/task/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) GetUserTaskRecordsList(ctx context.Context, req *v1.GetUserTaskRecordsListReq) (res *v1.GetUserTaskRecordsListRes, err error) {
|
||||
fromCtx := g.RequestFromCtx(ctx)
|
||||
userId := fromCtx.GetCtxVar("id").Int()
|
||||
out, err := service.Task().GetUserTaskRecordsList(ctx, &model.UserTaskRecordsListIn{UserId: userId})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &v1.GetUserTaskRecordsListRes{
|
||||
List: out.List,
|
||||
Total: out.Total,
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user