二测质押用户奖励
This commit is contained in:
@@ -33,7 +33,7 @@ func (l *BindWalletLogic) BindWallet(req *types.EmailKey) *types.CarvResult {
|
||||
return errResult
|
||||
}
|
||||
|
||||
_, err := l.svcCtx.WalletModel.FindAddressByUid(l.ctx, uid)
|
||||
pb, err := l.svcCtx.PromoteBindModel.FindOneByInvitedUid(l.ctx, uid)
|
||||
if err != nil {
|
||||
if !errors.Is(err, model.ErrNotFound) {
|
||||
return &types.CarvResult{
|
||||
@@ -47,6 +47,15 @@ func (l *BindWalletLogic) BindWallet(req *types.EmailKey) *types.CarvResult {
|
||||
Result: &types.Result{IsValid: false},
|
||||
}
|
||||
}
|
||||
|
||||
shareId := l.svcCtx.ConfigModel.GetCarvIoInviterId(l.ctx)
|
||||
|
||||
if pb.ShareUid != shareId || pb.IsBindWallet == 0 {
|
||||
return &types.CarvResult{
|
||||
Result: &types.Result{IsValid: false},
|
||||
}
|
||||
}
|
||||
|
||||
return &types.CarvResult{
|
||||
Result: &types.Result{IsValid: true},
|
||||
}
|
||||
|
||||
@@ -45,10 +45,11 @@ func (l *DownloadAndBindRoleLogic) DownloadAndBindRole(req *types.EmailKey) *typ
|
||||
}}
|
||||
}
|
||||
|
||||
if pb.IsCreateRole == 0 {
|
||||
return &types.CarvResult{Result: &types.Result{
|
||||
IsValid: false,
|
||||
}}
|
||||
shareId := l.svcCtx.ConfigModel.GetCarvIoInviterId(l.ctx)
|
||||
if pb.ShareUid != shareId || pb.IsCreateRole == 0 {
|
||||
return &types.CarvResult{
|
||||
Result: &types.Result{IsValid: false},
|
||||
}
|
||||
}
|
||||
|
||||
return &types.CarvResult{
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -35,6 +35,29 @@ func (l *WalletCheckInLogic) WalletCheckIn(req *types.EmailKey) *types.CarvResul
|
||||
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},
|
||||
}
|
||||
}
|
||||
|
||||
task, err := l.svcCtx.TaskModel.FindDailyPayTask(l.ctx)
|
||||
if err != nil {
|
||||
if !errors.Is(err, model.ErrNotFound) {
|
||||
|
||||
Reference in New Issue
Block a user