新增猜你喜欢列表接口
This commit is contained in:
@@ -344,3 +344,20 @@ func (r *Question) PutQuestionSubmitCount(c *gin.Context) {
|
||||
|
||||
responses.Ok(c)
|
||||
}
|
||||
|
||||
// GetGuessUserLikeList 获取问题列表-猜你喜欢
|
||||
func (b *Question) GetGuessUserLikeList(c *gin.Context) {
|
||||
userId := c.GetInt64("UserId")
|
||||
|
||||
// 获取数据
|
||||
questionService := service.QuestionService{}
|
||||
questions, err := questionService.GetGuessUserLIkeList(userId)
|
||||
if err != nil {
|
||||
responses.OkWithData(nil, c)
|
||||
}
|
||||
|
||||
// 处理返回值
|
||||
g := dto.GetHotQuestionListDto(questions)
|
||||
|
||||
responses.OkWithData(g, c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user