package web_feedback import ( "videoweb/pub/common" "videoweb/pub/common/srvdef" "videoweb/web/api/proto" "videoweb/web/service/srv_feedback" "github.com/gin-gonic/gin" ) // List web端意见反馈列表 // @Tags web意见反馈相关接口 // @Summary web端意见反馈列表 -- by 旺鸣 // @Description 分页查询用户意见反馈列表 // @Accept json // @Produce json // @Param params query proto.FeedbackListReq true "web端意见反馈列表请求" // @Success 200 {object} proto.FeedbackListPageResp{list=[]proto.FeedbackListResp} "成功" // @Failure 400 {string} string "失败" // @Security ApiKeyAuth // @Router /api/web/feedback/list [get] func List(ctx *gin.Context) { var req proto.FeedbackListReq if err := ctx.ShouldBindQuery(&req); err != nil { common.ServerJSON(ctx, srvdef.ErrParamError, nil) return } resp, err := srv_feedback.ListFeedback(ctx, &req) if err != nil { common.ServerJSON(ctx, err.Code, err.Tips) return } common.ServerJSON(ctx, srvdef.Success, resp) } // Handle web端处理意见反馈 // @Tags web意见反馈相关接口 // @Summary web端处理意见反馈 -- by 旺鸣 // @Description 批量更新意见反馈处理状态 // @Accept json // @Produce json // @Param params body proto.FeedbackHandleReq true "web端意见反馈处理请求" // @Success 200 {object} proto.FeedbackHandleResp "成功" // @Failure 400 {string} string "失败" // @Security ApiKeyAuth // @Router /api/web/feedback/handle [post] func Handle(ctx *gin.Context) { var req proto.FeedbackHandleReq if err := ctx.ShouldBindJSON(&req); err != nil { common.ServerJSON(ctx, srvdef.ErrParamError, nil) return } resp, err := srv_feedback.HandleFeedback(ctx, &req) if err != nil { common.ServerJSON(ctx, err.Code, err.Tips) return } common.ServerJSON(ctx, srvdef.Success, resp) }