Merge branch 'feat/1.0.7/short-id' into test

This commit is contained in:
aichy126 2023-03-16 16:24:51 +08:00
commit ebacd7e8e1
2 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,7 @@ import (
"github.com/answerdev/answer/internal/entity"
"github.com/answerdev/answer/internal/service/activity_queue"
"github.com/answerdev/answer/pkg/converter"
"github.com/answerdev/answer/pkg/uid"
"github.com/segmentfault/pacman/log"
"xorm.io/xorm"
)
@ -60,8 +61,8 @@ func (ac *ActivityCommon) HandleActivity() {
act := &entity.Activity{
UserID: msg.UserID,
TriggerUserID: msg.TriggerUserID,
ObjectID: msg.ObjectID,
OriginalObjectID: msg.OriginalObjectID,
ObjectID: uid.DeShortID(msg.ObjectID),
OriginalObjectID: uid.DeShortID(msg.OriginalObjectID),
ActivityType: activityType,
Cancelled: entity.ActivityAvailable,
}

View File

@ -481,7 +481,7 @@ func (qs *QuestionService) UpdateQuestion(ctx context.Context, req *schema.Quest
question.Title = req.Title
question.OriginalText = req.Content
question.ParsedText = req.HTML
question.ID = req.ID
question.ID = uid.DeShortID(req.ID)
question.UpdatedAt = now
question.PostUpdateTime = now
question.UserID = dbinfo.UserID