新增奖励回调接口,调整奖励领取接口

This commit is contained in:
chy
2025-06-25 20:57:41 +08:00
parent 853ee2190a
commit ecee39efff
33 changed files with 679 additions and 179 deletions

View File

@ -359,16 +359,20 @@ func (s *sReward) List(ctx context.Context, in *model.RewardListIn) (out *model.
// GetLift 领取奖励
func (s *sReward) GetLift(ctx context.Context, in *model.GetRewardIn) (out *model.GetRewardOut, err error) {
// 遍历奖励类型列表
//for _, v := range in.RewradTypeId {
// if v > 0 {
// // 发背包+兑换
//
// }
// if v > 0 {
// // 直接发背包
// }
//}
// 判断奖励类型
if in.Source == 1 {
// 系统奖励处理
if in.RewradTypeId != 16 {
// 需要大区角色
} else {
// 不需要
}
} else {
// 门店奖励处理
}
activity, err := gamelife.GetGamelifeClient(ctx).RequestActivity(ctx, &model.QQNetbarActivityIn{PopenId: in.PopenId, ServiceName: consts.GetGift, GiftParam: model.GiftParam{
TaskId: in.TaskId,
@ -496,3 +500,18 @@ func (s *sReward) OperateTaskReward(ctx context.Context, in *model.OperateTaskRe
return &model.OperateTaskRewardOut{Success: true}, err
}
}
// CallBack 奖励回调
func (s *sReward) CallBack(ctx context.Context, in *model.RewardCallbackIn) (out *model.RewardCallbackOut, err error) {
dao.RewardCallback.Ctx(ctx).Insert(do.RewardCallback{
OrderId: in.OrderId,
PrizeId: in.PrizeId,
PrizeType: in.PrizeType,
PrizeSubType: in.PrizeSubType,
Uid: in.Uid,
Num: in.Num,
CustomInfo: in.CustomInfo,
})
return nil, err
}