This is an automated email from the ASF dual-hosted git repository.

kumfo pushed a commit to branch feat/1.4.0/badge
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git


The following commit(s) were added to refs/heads/feat/1.4.0/badge by this push:
     new 122ac657 feat(badge): change badge_award check
122ac657 is described below

commit 122ac657f14f4806956ed0e70bc518d175efa57b
Author: kumfo <[email protected]>
AuthorDate: Thu Aug 8 18:17:41 2024 +0800

    feat(badge): change badge_award check
---
 internal/repo/badge_award/badge_award_repo.go       | 4 ++--
 internal/service/badge_award/badge_award_service.go | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/internal/repo/badge_award/badge_award_repo.go 
b/internal/repo/badge_award/badge_award_repo.go
index 0a460347..85d3ceac 100644
--- a/internal/repo/badge_award/badge_award_repo.go
+++ b/internal/repo/badge_award/badge_award_repo.go
@@ -43,10 +43,10 @@ func NewBadgeAwardRepo(data *data.Data, uniqueIDRepo 
unique.UniqueIDRepo) badge_
        }
 }
 
-func (r *badgeAwardRepo) Award(ctx context.Context, badgeID string, userID 
string, objectID string, force bool, createdAt time.Time) {
+func (r *badgeAwardRepo) Award(ctx context.Context, badgeID string, userID 
string, awardKey string, force bool, createdAt time.Time) {
        return
 }
-func (r *badgeAwardRepo) CheckIsAward(ctx context.Context, badgeID string, 
userID string, objectID string) (isAward bool) {
+func (r *badgeAwardRepo) CheckIsAward(ctx context.Context, badgeID string, 
userID string, awardKey string) (isAward bool) {
        return
 }
 func (r *badgeAwardRepo) CountByUserIdAndBadgeLevel(ctx context.Context, 
userID string, badgeLevel entity.BadgeLevel) (awardCount int64) {
diff --git a/internal/service/badge_award/badge_award_service.go 
b/internal/service/badge_award/badge_award_service.go
index 7eb218fd..d94258b4 100644
--- a/internal/service/badge_award/badge_award_service.go
+++ b/internal/service/badge_award/badge_award_service.go
@@ -33,8 +33,8 @@ import (
 )
 
 type BadgeAwardRepo interface {
-       Award(ctx context.Context, badgeID string, userID string, objectID 
string, force bool, createdAt time.Time)
-       CheckIsAward(ctx context.Context, badgeID string, userID string, 
objectID string) bool
+       Award(ctx context.Context, badgeID string, userID string, awardKey 
string, force bool, createdAt time.Time)
+       CheckIsAward(ctx context.Context, badgeID string, userID string, 
awardKey string) bool
 
        CountByUserIdAndBadgeLevel(ctx context.Context, userID string, 
badgeLevel entity.BadgeLevel) (awardCount int64)
        CountByUserId(ctx context.Context, userID string) (awardCount int64)

Reply via email to