修改领取奖励部分

This commit is contained in:
chy
2025-06-27 10:31:40 +08:00
parent 6a3a06574a
commit ae19e9917e
4 changed files with 50 additions and 10 deletions

View File

@ -2,12 +2,15 @@ package reward
import (
"context"
"github.com/gogf/gf/v2/frame/g"
"server/api/reward/v1"
"server/internal/model"
"server/internal/service"
)
func (c *ControllerV1) GetLift(ctx context.Context, req *v1.GetLiftReq) (res *v1.GetLiftRes, err error) {
userId := g.RequestFromCtx(ctx).Get("id")
out, err := service.Reward().GetLift(ctx, &model.GetRewardIn{
GameId: req.GameId,
TaskId: req.TaskId,
@ -17,6 +20,9 @@ func (c *ControllerV1) GetLift(ctx context.Context, req *v1.GetLiftReq) (res *v1
AreaId: req.AreaId,
Source: req.Source,
BindType: req.BindType,
UserTaskId: req.UserTaskId,
UserId: userId.Int(),
RewardId: req.RewradId,
})
if err != nil {