修改新增门店奖励、封装登录任务接口
This commit is contained in:
@ -4,9 +4,9 @@ import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type CreateReq struct {
|
||||
g.Meta `path:"/storeTaskReward" method:"post" tags:"StoreTaskReward" summary:"(商户、门店后台)创建门店任务奖励"`
|
||||
TaskId int64 `json:"taskId" v:"required#门店任务ID不能为空" dc:"门店任务ID"`
|
||||
RewardId int64 `json:"rewardId" v:"required#奖励ID不能为空" dc:"奖励ID"`
|
||||
StoreId int64 `json:"storeId" v:"required#门店ID不能为空" dc:"门店ID"`
|
||||
TaskId string `json:"taskId" v:"required#任务 Id 不能为空" dc:"任务 Id"`
|
||||
RewardId int64 `json:"rewardId" v:"required#奖励ID不能为空" dc:"奖励ID"`
|
||||
StoreId int64 `json:"storeId" v:"required#门店ID不能为空" dc:"门店ID"`
|
||||
}
|
||||
|
||||
type CreateRes struct {
|
||||
|
||||
@ -17,9 +17,9 @@ type StoreTaskReward struct {
|
||||
type StoreTaskRewardCreateIn struct {
|
||||
OperatorId int64
|
||||
OperatorRole string
|
||||
TaskId int64 // 门店任务ID
|
||||
RewardId int64 // 奖励ID
|
||||
StoreId int64 // 门店ID
|
||||
TaskId string // 门店任务ID
|
||||
RewardId int64 // 奖励ID
|
||||
StoreId int64 // 门店ID
|
||||
}
|
||||
|
||||
// StoreTaskRewardCreateOut 创建任务奖励关联出参
|
||||
|
||||
@ -330,8 +330,21 @@ func (s *gamelifeClient) RequestActivity(ctx context.Context, in *model.QQNetbar
|
||||
}
|
||||
return &result, nil
|
||||
case consts.GetTaskList:
|
||||
result := model.GameTaskResponse{}
|
||||
in.TaskParam.BrandId = s.BrandId
|
||||
resp, err := client.R().
|
||||
SetContext(ctx).
|
||||
SetBody(in.TaskParam).
|
||||
SetResult(&result).
|
||||
Post(s.taskUrlMap[s.Mode] + consts.GetTaskList)
|
||||
if err != nil {
|
||||
return nil, ecode.Fail.Sub("请求出现异常")
|
||||
}
|
||||
if resp.IsError() {
|
||||
return nil, ecode.Fail.Sub("请求失败")
|
||||
}
|
||||
return &result, nil
|
||||
|
||||
return nil, nil
|
||||
default:
|
||||
return nil, ecode.Fail.Sub("不支持的任务")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user