A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.
update question pin show
aichy126766bf793c464
diff --git a/internal/schema/question_schema.go b/internal/schema/question_schema.goindex b5b523e8..9284ba9c 100644--- a/internal/schema/question_schema.go+++ b/internal/schema/question_schema.go@@ -184,6 +184,8 @@ type QuestionInfo struct {UpdateTime int64 `json:"-"` // update_timePostUpdateTime int64 `json:"update_time"`QuestionUpdateTime int64 `json:"edit_time"`+ Pin int `json:"pin"` // 1: unpin, 2: pin+ Show int `json:"show"` // 0: show, 1: hideStatus int `json:"status"`Operation *Operation `json:"operation,omitempty"`UserID string `json:"-" `diff --git a/internal/service/question_common/question.go b/internal/service/question_common/question.goindex 4b4f259b..38ae8a9d 100644--- a/internal/service/question_common/question.go+++ b/internal/service/question_common/question.go@@ -528,6 +528,8 @@ func (qs *QuestionCommon) ShowFormat(ctx context.Context, data *entity.Question)info.QuestionUpdateTime = 0}info.Status = data.Status+ info.Pin = data.Pin+ info.Show = data.Showinfo.UserID = data.UserIDinfo.LastEditUserID = data.LastEditUserIDif data.LastAnswerID != "0" {