Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
package feedbackser
import (
"91porn-server/common/stderr"
"91porn-server/middleware/ua"
"91porn-server/models/commod"
"91porn-server/models/v/feedbackmod"
)
type FeedbackReq struct {
CateInfo string `json:"cateInfo" binding:"lte=20"` // 问题分类 限制10个字
Desc string `json:"desc" binding:"required,lte=100"` // 描述 限制50个字
Region string `json:"region" binding:"lte=30"` // 地区 限制10个字
DevInfo string `json:"devInfo" binding:"lte=20"` // 设备信息 限制10个字
ISP string `json:"ISP" binding:"lte=20"` // 运营商 限制10个字
Contact string `json:"contact" binding:"lte=30"` // 联系方式 限制20个字
Images []string `json:"images"` // 图片信息
}
func (q FeedbackReq) Submit(ua ua.UA, uid uint64) (code stderr.Code, err error) {
var cInfo = feedbackmod.ContentInfo{
CateInfo: q.CateInfo,
Desc: q.Desc,
Region: q.Region,
DevInfo: q.DevInfo,
ISP: q.ISP,
Contact: q.Contact,
Images: q.Images,
}
return feedbackmod.FeedBackInsert(feedbackmod.FeedBack{UID: uid, Content: cInfo, Version: ua.Ver, DevType: ua.DevType})
}
// GetFeedBackList 获取反馈列表
func GetFeedBackList(page commod.Page, uid uint64) (data commod.ListResp, err error) {
var feedbacks []feedbackmod.FeedBack
feedbacks, data.HasNext, err = feedbackmod.GetFeedBackList(page.PageSize, page.PageNumber, uid)
data.List = feedbacks
return
}