修改新增门店奖励、封装登录任务接口
This commit is contained in:
@ -4,7 +4,7 @@ import "github.com/gogf/gf/v2/frame/g"
|
|||||||
|
|
||||||
type CreateReq struct {
|
type CreateReq struct {
|
||||||
g.Meta `path:"/storeTaskReward" method:"post" tags:"StoreTaskReward" summary:"(商户、门店后台)创建门店任务奖励"`
|
g.Meta `path:"/storeTaskReward" method:"post" tags:"StoreTaskReward" summary:"(商户、门店后台)创建门店任务奖励"`
|
||||||
TaskId int64 `json:"taskId" v:"required#门店任务ID不能为空" dc:"门店任务ID"`
|
TaskId string `json:"taskId" v:"required#任务 Id 不能为空" dc:"任务 Id"`
|
||||||
RewardId int64 `json:"rewardId" v:"required#奖励ID不能为空" dc:"奖励ID"`
|
RewardId int64 `json:"rewardId" v:"required#奖励ID不能为空" dc:"奖励ID"`
|
||||||
StoreId int64 `json:"storeId" v:"required#门店ID不能为空" dc:"门店ID"`
|
StoreId int64 `json:"storeId" v:"required#门店ID不能为空" dc:"门店ID"`
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,7 +17,7 @@ type StoreTaskReward struct {
|
|||||||
type StoreTaskRewardCreateIn struct {
|
type StoreTaskRewardCreateIn struct {
|
||||||
OperatorId int64
|
OperatorId int64
|
||||||
OperatorRole string
|
OperatorRole string
|
||||||
TaskId int64 // 门店任务ID
|
TaskId string // 门店任务ID
|
||||||
RewardId int64 // 奖励ID
|
RewardId int64 // 奖励ID
|
||||||
StoreId int64 // 门店ID
|
StoreId int64 // 门店ID
|
||||||
}
|
}
|
||||||
|
|||||||
@ -330,8 +330,21 @@ func (s *gamelifeClient) RequestActivity(ctx context.Context, in *model.QQNetbar
|
|||||||
}
|
}
|
||||||
return &result, nil
|
return &result, nil
|
||||||
case consts.GetTaskList:
|
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:
|
default:
|
||||||
return nil, ecode.Fail.Sub("不支持的任务")
|
return nil, ecode.Fail.Sub("不支持的任务")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user