来源:hgdjnet-server 9bfbafe10d417deea959bd53117bc88a10e60a83 项目身份 HKDJ / JHA-216,独立官网仓库,Jenkins 守卫键 hkdjnet 测试目录 /server/hkdj_net,App/Web API 30331/30332 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
61 lines
1.8 KiB
Go
61 lines
1.8 KiB
Go
package web_feedback
|
|
|
|
import (
|
|
"hkdj-web-server/pub/common"
|
|
"hkdj-web-server/pub/common/srvdef"
|
|
"hkdj-web-server/web/api/proto"
|
|
"hkdj-web-server/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)
|
|
}
|