|
@@ -117,9 +117,13 @@ func GetQuestionList(pageIndex, pageSize, onlyMine, chartPermissionId, replyStat
|
|
|
}
|
|
|
|
|
|
// GetQuestionDetail 获取问答详情
|
|
|
-func GetQuestionDetail(questionId int, userInfo user.UserInfo) (item *response.CommunityQuestionItem, err error) {
|
|
|
+func GetQuestionDetail(questionId int, userInfo user.UserInfo) (item *response.CommunityQuestionItem, errMsg string, err error) {
|
|
|
detail, e := yb_community_question.GetItemById(questionId)
|
|
|
+ errMsg = "获取失败"
|
|
|
if e != nil {
|
|
|
+ if e == utils.ErrNoRow {
|
|
|
+ errMsg = "问题已被删除"
|
|
|
+ }
|
|
|
err = errors.New("获取问题详情失败 Err:" + e.Error())
|
|
|
return
|
|
|
}
|
|
@@ -167,6 +171,7 @@ func GetQuestionDetail(questionId int, userInfo user.UserInfo) (item *response.C
|
|
|
PermissionInfo: permissionInfo,
|
|
|
AudioList: audios,
|
|
|
}
|
|
|
+ errMsg = "获取成功"
|
|
|
return
|
|
|
}
|
|
|
|