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 Annotation document
aichy126ec950da8886b
diff --git a/docs/docs.go b/docs/docs.goindex aaf70898..529f1d8c 100644--- a/docs/docs.go+++ b/docs/docs.go@@ -4092,7 +4092,7 @@ const docTemplate = `{"type": "string"},"html": {- "description": "解析后的html",+ "description": "html","type": "string"},"question_id": {@@ -4146,7 +4146,7 @@ const docTemplate = `{"type": "string"},"html": {- "description": "解析后的html",+ "description": "html","type": "string"},"id": {diff --git a/docs/swagger.json b/docs/swagger.jsonindex 1b8b7b86..ac6454cd 100644--- a/docs/swagger.json+++ b/docs/swagger.json@@ -4080,7 +4080,7 @@"type": "string"},"html": {- "description": "解析后的html",+ "description": "html","type": "string"},"question_id": {@@ -4134,7 +4134,7 @@"type": "string"},"html": {- "description": "解析后的html",+ "description": "html","type": "string"},"id": {diff --git a/docs/swagger.yaml b/docs/swagger.yamlindex 7fb3d432..9d9b87ef 100644--- a/docs/swagger.yaml+++ b/docs/swagger.yaml@@ -129,7 +129,7 @@ definitions:description: contenttype: stringhtml:- description: 解析后的html+ description: htmltype: stringquestion_id:description: question_id@@ -167,7 +167,7 @@ definitions:description: edit_summarytype: stringhtml:- description: 解析后的html+ description: htmltype: stringid:description: iddiff --git a/internal/entity/auth_user_entity.go b/internal/entity/auth_user_entity.goindex 2e846833..d1f366a4 100644--- a/internal/entity/auth_user_entity.go+++ b/internal/entity/auth_user_entity.go@@ -1,6 +1,6 @@package entity-// UserCacheInfo 用户缓存信息+// UserCacheInfo User Cache Informationtype UserCacheInfo struct {UserID string `json:"user_id"`UserStatus int `json:"user_status"`diff --git a/internal/schema/answer_schema.go b/internal/schema/answer_schema.goindex 74c4111c..fde11165 100644--- a/internal/schema/answer_schema.go+++ b/internal/schema/answer_schema.go@@ -16,7 +16,7 @@ const (type AnswerAddReq struct {QuestionId string `json:"question_id" ` // question_idContent string `json:"content" ` // content- Html string `json:"html" ` // 解析后的html+ Html string `json:"html" ` // htmlUserID string `json:"-" ` // user_id}@@ -26,7 +26,7 @@ type AnswerUpdateReq struct {UserID string `json:"-" ` // user_idTitle string `json:"title" ` // titleContent string `json:"content"` // content- Html string `json:"html" ` // 解析后的html+ Html string `json:"html" ` // htmlEditSummary string `validate:"omitempty" json:"edit_summary"` //edit_summary}diff --git a/internal/schema/question_schema.go b/internal/schema/question_schema.goindex 139684bf..a619c454 100644--- a/internal/schema/question_schema.go+++ b/internal/schema/question_schema.go@@ -52,27 +52,27 @@ type QuestionUpdate struct {type QuestionBaseInfo struct {ID string `json:"id" `- Title string `json:"title" xorm:"title"` // 标题- ViewCount int `json:"view_count" xorm:"view_count"` // view_count- AnswerCount int `json:"answer_count" xorm:"answer_count"` // 回复总数- CollectionCount int `json:"collection_count" xorm:"collection_count"` // 收藏总数- FollowCount int `json:"follow_count" xorm:"follow_count"` // 关注数+ Title string `json:"title" xorm:"title"` // title+ ViewCount int `json:"view_count" xorm:"view_count"` // view count+ AnswerCount int `json:"answer_count" xorm:"answer_count"` // answer count+ CollectionCount int `json:"collection_count" xorm:"collection_count"` // collection count+ FollowCount int `json:"follow_count" xorm:"follow_count"` // follow countStatus string `json:"status"`AcceptedAnswer bool `json:"accepted_answer"`}type QuestionInfo struct {ID string `json:"id" `- Title string `json:"title" xorm:"title"` // 标题- Content string `json:"content" xorm:"content"` // 内容- Html string `json:"html" xorm:"html"` // 解析后的html+ Title string `json:"title" xorm:"title"` // title+ Content string `json:"content" xorm:"content"` // content+ Html string `json:"html" xorm:"html"` // htmlTags []*TagResp `json:"tags" ` // tagsViewCount int `json:"view_count" xorm:"view_count"` // view_countUniqueViewCount int `json:"unique_view_count" xorm:"unique_view_count"` // unique_view_countVoteCount int `json:"vote_count" xorm:"vote_count"` // vote_count- AnswerCount int `json:"answer_count" xorm:"answer_count"` // 回复总数- CollectionCount int `json:"collection_count" xorm:"collection_count"` // 收藏总数- FollowCount int `json:"follow_count" xorm:"follow_count"` // 关注数+ AnswerCount int `json:"answer_count" xorm:"answer_count"` // answer count+ CollectionCount int `json:"collection_count" xorm:"collection_count"` // collection count+ FollowCount int `json:"follow_count" xorm:"follow_count"` // follow countAcceptedAnswerId string `json:"accepted_answer_id" ` // accepted_answer_idLastAnswerId string `json:"last_answer_id" ` // last_answer_idCreateTime int64 `json:"create_time" ` // create_timediff --git a/internal/service/answer_service.go b/internal/service/answer_service.goindex 577c2f4a..ec1a8b4a 100644--- a/internal/service/answer_service.go+++ b/internal/service/answer_service.go@@ -365,7 +365,6 @@ func (as *AnswerService) SearchList(ctx context.Context, search *schema.AnswerLifunc (as *AnswerService) SearchFormatInfo(ctx context.Context, dblist []*entity.Answer, loginUserId string) ([]*schema.AnswerInfo, error) {list := make([]*schema.AnswerInfo, 0)- //todo 依赖其他接口objectIds := make([]string, 0)userIds := make([]string, 0)for _, dbitem := range dblist {diff --git a/pkg/checker/password.go b/pkg/checker/password.goindex 4b64ff60..33e4e3da 100644--- a/pkg/checker/password.go+++ b/pkg/checker/password.go@@ -14,13 +14,13 @@ const ()/*- * minLength: 指定密码的最小长度- * maxLength:指定密码的最大长度- * minLevel:指定密码最低要求的强度等级- * pwd:明文密码+ * minLength: Specifies the minimum length of a password+ * maxLength:Specifies the maximum length of a password+ * minLevel:Specifies the minimum strength level required for passwords+ * pwd:Text passwords*/func PassWordCheck(minLength, maxLength, minLevel int, pwd string) error {- // 首先校验密码长度是否在范围内+ // First check whether the password length is within the rangeif len(pwd) < minLength {return fmt.Errorf("BAD PASSWORD: The password is shorter than %d characters", minLength)}@@ -28,7 +28,9 @@ func PassWordCheck(minLength, maxLength, minLevel int, pwd string) error {return fmt.Errorf("BAD PASSWORD: The password is logner than %d characters", maxLength)}- // 初始化密码强度等级为D,利用正则校验密码强度,若匹配成功则强度自增1+ // The password strength level is initialized to D.+ // The regular is used to verify the password strength.+ // If the matching is successful, the password strength increases by 1var level int = levelDpatternList := []string{`[0-9]+`, `[a-z]+`, `[A-Z]+`, `[~!@#$%^&*?_-]+`}for _, pattern := range patternList {@@ -38,7 +40,7 @@ func PassWordCheck(minLength, maxLength, minLevel int, pwd string) error {}}- // 如果最终密码强度低于要求的最低强度,返回并报错+ // If the final password strength falls below the required minimum strength, return with an errorif level < minLevel {return fmt.Errorf("The password does not satisfy the current policy requirements. ")}