二测质押用户奖励

This commit is contained in:
lianghuanjie
2025-01-10 11:34:52 +08:00
parent 84d23a295d
commit a6efc2236a
8 changed files with 100 additions and 20 deletions

View File

@@ -32,6 +32,30 @@ func (l *UnlockChapterLogic) UnlockChapter(req *types.UnlockChapterReq) *types.C
if errResult != nil {
return errResult
}
pb, err := l.svcCtx.PromoteBindModel.FindOneByInvitedUid(l.ctx, uid)
if err != nil {
if !errors.Is(err, model.ErrNotFound) {
return &types.CarvResult{
Error: &types.Error{
Code: int(errs.ErrDatabaseOperate),
Message: "system error",
},
}
}
return &types.CarvResult{
Result: &types.Result{IsValid: false},
}
}
shareId := l.svcCtx.ConfigModel.GetCarvIoInviterId(l.ctx)
if pb.ShareUid != shareId {
return &types.CarvResult{
Result: &types.Result{IsValid: false},
}
}
gp, err := l.svcCtx.GameReportModel.FindOneByUid(l.ctx, uid)
if err != nil {
if !errors.Is(err, model.ErrNotFound) {