feat: 从黄果 NET hgdjnet-server 9bfbafe 导入 HKDJ 官网后端

来源: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>
This commit is contained in:
2026-10-16 11:20:04 +08:00
co-authored by Claude Opus 4.7
parent 99a4854def
commit 85c0071fd8
653 changed files with 85000 additions and 0 deletions
+60
View File
@@ -0,0 +1,60 @@
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)
}