appraisecontroller.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package controller
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "trading-go/model"
  5. "trading-go/response"
  6. )
  7. // CreateAppraise
  8. // @Tags 评论模块
  9. // @Summary 创建评论
  10. // @Produce application/json
  11. // @Param json body model.AppraiseJson true "评价信息"
  12. // @Success 200 {object} response.Response
  13. // @Router /appraise/create [post]
  14. func CreateAppraise(c *gin.Context) {
  15. response.Success(c.Writer, "success", nil)
  16. }
  17. // DAppraise
  18. // @Tags 评论模块
  19. // @Summary 删除评论
  20. // @Produce application/json
  21. // @Param id path int64 true "评论id"
  22. // @Success 200 {object} response.Response
  23. // @Router /appraise/delete/{id} [delete]
  24. func DAppraise(c *gin.Context) {
  25. response.Success(c.Writer, "success", nil)
  26. }
  27. // RAppraise
  28. // @Tags 评论模块
  29. // @Summary 修改评论
  30. // @Produce application/json
  31. // @Param json body model.Appraise true "评价信息"
  32. // @Success 200 {object} response.Response
  33. // @Router /appraise/revise [post]
  34. func RAppraise(c *gin.Context) {
  35. response.Success(c.Writer, "success", nil)
  36. }
  37. // GetUserAppraise
  38. // @Tags 评论模块
  39. // @Summary 获取用户评价
  40. // @Produce application/json
  41. // @Param id query int64 true "用户id"
  42. // @Success 200 {object} response.Response
  43. // @Router /appraise/user [get]
  44. func GetUserAppraise(c *gin.Context) {
  45. var appraises []model.Appraise
  46. appraises = append(appraises, model.Appraise{})
  47. appraises = append(appraises, model.Appraise{})
  48. response.Success(c.Writer, "success", appraises)
  49. }