This commit is contained in:
2024-10-16 20:46:46 +08:00
parent fdfdbb5ff6
commit 185b8aef90
14 changed files with 546 additions and 306 deletions

View File

@@ -72,7 +72,11 @@ func (l *ReviewEnterpriseLogic) ReviewEnterprise(in *user.ReviewEnterpriseReq) (
if insertEnterpriseErr != nil {
return insertEnterpriseErr
}
_, InsertWalletsTransErr := l.svcCtx.WalletsModel.InsertWalletsTrans(l.ctx, &model.Wallets{UserId: enterpriseAuth.UserId}, session)
userConfig, FindUserConfigErr := l.svcCtx.UserConfigModel.FindOne(l.ctx, 1)
if FindUserConfigErr != nil {
return FindUserConfigErr
}
_, InsertWalletsTransErr := l.svcCtx.WalletsModel.InsertWalletsTrans(l.ctx, &model.Wallets{UserId: enterpriseAuth.UserId, Balance: userConfig.GiftAmount}, session)
if InsertWalletsTransErr != nil {
return InsertWalletsTransErr
}
@@ -83,7 +87,6 @@ func (l *ReviewEnterpriseLogic) ReviewEnterprise(in *user.ReviewEnterpriseReq) (
return createSecretErr
}
}
return nil
})