diff --git a/api/dao/QuestionQa.go b/api/dao/QuestionQa.go index 6cdb9d3..cf6e7b4 100644 --- a/api/dao/QuestionQa.go +++ b/api/dao/QuestionQa.go @@ -165,6 +165,7 @@ func (r *QuestionQaDao) GetQuestionQaPageSearch(req requests.GetQuestionQaPage, // 排序 if req.Order != nil { + // 有效期 if req.Order.QaExpireTime != "" { if req.Order.QaExpireTime != "desc" && req.Order.QaExpireTime != "asc" { return nil, 0, errors.New("排序字段错误") @@ -173,6 +174,7 @@ func (r *QuestionQaDao) GetQuestionQaPageSearch(req requests.GetQuestionQaPage, query = query.Order("qa_expire_time " + req.Order.QaExpireTime) } + // 题目数量 if req.Order.QaQuantity != "" { if req.Order.QaQuantity != "desc" && req.Order.QaQuantity != "asc" { return nil, 0, errors.New("排序字段错误") @@ -181,6 +183,7 @@ func (r *QuestionQaDao) GetQuestionQaPageSearch(req requests.GetQuestionQaPage, query = query.Order("qa_quantity " + req.Order.QaQuantity) } + // 修改时间 if req.Order.UpdatedAt != "" { if req.Order.UpdatedAt != "desc" && req.Order.UpdatedAt != "asc" { return nil, 0, errors.New("排序字段错误") diff --git a/config.yaml b/config.yaml index e5912e1..ff014d7 100644 --- a/config.yaml +++ b/config.yaml @@ -39,5 +39,5 @@ oss: oss-access-key: LTAI5tKmFrVCghcxX7yHyGhm oss-access-key-secret: q1aiIZCJJuf92YbKk2cSXnPES4zx26 oss-bucket: dev-knowledge - oss-endpoint: oss-cn-chengdu.aliyuncs.com + oss-endpoint: oss-cn-beijing.aliyuncs.com oss-custom-domain-name: https://dev-knowledge.oss-cn-beijing.aliyuncs.com