This commit is contained in:
2025-08-05 17:46:15 +08:00
parent e43d78ddf0
commit 4409bea9fc
106 changed files with 18564 additions and 7 deletions
@@ -0,0 +1,27 @@
package request
// MiniStatisticsRequest 小程序统计请求
type MiniStatisticsRequest struct {
StartDate string `json:"startDate" form:"startDate"` // 开始日期
EndDate string `json:"endDate" form:"endDate"` // 结束日期
Period string `json:"period" form:"period"` // 统计周期 day/week/month
}
// VisitTrendRequest 访问趋势请求
type VisitTrendRequest struct {
StartDate string `json:"startDate" form:"startDate" binding:"required"` // 开始日期
EndDate string `json:"endDate" form:"endDate" binding:"required"` // 结束日期
}
// PageAnalysisRequest 页面分析请求
type PageAnalysisRequest struct {
StartDate string `json:"startDate" form:"startDate"` // 开始日期
EndDate string `json:"endDate" form:"endDate"` // 结束日期
PagePath string `json:"pagePath" form:"pagePath"` // 页面路径
}
// UserRetentionRequest 用户留存请求
type UserRetentionRequest struct {
StartDate string `json:"startDate" form:"startDate" binding:"required"` // 开始日期
EndDate string `json:"endDate" form:"endDate" binding:"required"` // 结束日期
}
@@ -0,0 +1,69 @@
package request
// CreateAutoReplyRequest 创建自动回复请求
type CreateAutoReplyRequest struct {
Type int `json:"type" binding:"required" example:"1"`
RequestKeyword string `json:"requestKeyword" example:"你好"`
RequestMatch int `json:"requestMatch" example:"1"`
RequestMessageType string `json:"requestMessageType" example:"text"`
ResponseMessageType string `json:"responseMessageType" binding:"required" example:"text"`
ResponseContent string `json:"responseContent" example:"欢迎关注我们的公众号"`
ResponseMediaID string `json:"responseMediaId" example:""`
ResponseMediaURL string `json:"responseMediaUrl" example:""`
ResponseTitle string `json:"responseTitle" example:""`
ResponseDescription string `json:"responseDescription" example:""`
ResponseThumbMediaID string `json:"responseThumbMediaId" example:""`
ResponseThumbMediaURL string `json:"responseThumbMediaUrl" example:""`
ResponseArticles string `json:"responseArticles" example:""`
ResponseMusicURL string `json:"responseMusicUrl" example:""`
ResponseHqMusicURL string `json:"responseHqMusicUrl" example:""`
}
// UpdateAutoReplyRequest 更新自动回复请求
type UpdateAutoReplyRequest struct {
ID uint `json:"id" binding:"required"`
Type int `json:"type"`
RequestKeyword string `json:"requestKeyword"`
RequestMatch int `json:"requestMatch"`
RequestMessageType string `json:"requestMessageType"`
ResponseMessageType string `json:"responseMessageType"`
ResponseContent string `json:"responseContent"`
ResponseMediaID string `json:"responseMediaId"`
ResponseMediaURL string `json:"responseMediaUrl"`
ResponseTitle string `json:"responseTitle"`
ResponseDescription string `json:"responseDescription"`
ResponseThumbMediaID string `json:"responseThumbMediaId"`
ResponseThumbMediaURL string `json:"responseThumbMediaUrl"`
ResponseArticles string `json:"responseArticles"`
ResponseMusicURL string `json:"responseMusicUrl"`
ResponseHqMusicURL string `json:"responseHqMusicUrl"`
}
// TestAutoReplyRequest 测试自动回复请求
type TestAutoReplyRequest struct {
Keyword string `json:"keyword" binding:"required" example:"你好"`
}
// PageInfo 分页信息
type PageInfo struct {
Page int `json:"page" form:"page"` // 页码
PageSize int `json:"pageSize" form:"pageSize"` // 每页数量
}
// AutoReplyPageRequest 自动回复分页请求
type AutoReplyPageRequest struct {
PageInfo
Type *int `json:"type" form:"type"`
}
// SetSubscribeReplyRequest 设置关注回复请求
type SetSubscribeReplyRequest struct {
Content string `json:"content" binding:"required" example:"感谢您的关注!"`
}
// SetKeywordReplyRequest 设置关键字回复请求
type SetKeywordReplyRequest struct {
Keyword string `json:"keyword" binding:"required" example:"你好"`
Content string `json:"content" binding:"required" example:"您好,欢迎咨询!"`
MatchType int `json:"matchType" binding:"required" example:"1"`
}
@@ -0,0 +1,47 @@
package request
// CreateMenuRequest 创建菜单请求
type CreateMenuRequest struct {
Name string `json:"name" binding:"required" example:"菜单名称"`
Type string `json:"type" binding:"required" example:"click"`
ParentID string `json:"parentId" example:"1"`
MenuKey string `json:"menuKey" example:"MENU_KEY_1"`
URL string `json:"url" example:"https://example.com"`
MiniProgramAppID string `json:"miniProgramAppId" example:"wx1234567890"`
MiniProgramPagePath string `json:"miniProgramPagePath" example:"pages/index/index"`
ReplyMessageType string `json:"replyMessageType" example:"text"`
ReplyContent string `json:"replyContent" example:"欢迎使用"`
}
// UpdateMenuRequest 更新菜单请求
type UpdateMenuRequest struct {
ID uint `json:"id" binding:"required"`
Name string `json:"name"`
Type string `json:"type"`
ParentID string `json:"parentId"`
MenuKey string `json:"menuKey"`
URL string `json:"url"`
MiniProgramAppID string `json:"miniProgramAppId"`
MiniProgramPagePath string `json:"miniProgramPagePath"`
ReplyMessageType string `json:"replyMessageType"`
ReplyContent string `json:"replyContent"`
}
// MenuTreeNode 菜单树节点
type MenuTreeNode struct {
ID uint `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
MenuKey string `json:"menuKey"`
URL string `json:"url"`
MiniProgramAppID string `json:"miniProgramAppId"`
MiniProgramPagePath string `json:"miniProgramPagePath"`
ReplyMessageType string `json:"replyMessageType"`
ReplyContent string `json:"replyContent"`
Children []MenuTreeNode `json:"children"`
}
// SaveMenuRequest 保存菜单请求(批量保存)
type SaveMenuRequest struct {
Menus []CreateMenuRequest `json:"menus" binding:"required"`
}
@@ -0,0 +1,41 @@
package request
// MiniLoginRequest 小程序登录请求
type MiniLoginRequest struct {
Code string `json:"code" binding:"required"` // 微信登录凭证
}
// UpdateUserInfoRequest 更新用户信息请求
type UpdateUserInfoRequest struct {
OpenID string `json:"openid" binding:"required"` // 用户openid
UserInfo map[string]interface{} `json:"userInfo"` // 用户信息
}
// BindPhoneRequest 绑定手机号请求
type BindPhoneRequest struct {
OpenID string `json:"openid" binding:"required"` // 用户openid
Phone string `json:"phone" binding:"required"` // 手机号
}
// SyncUserRequest 同步用户请求
type SyncUserRequest struct {
OpenID string `json:"openid" binding:"required"` // 用户openid
}
// UpdateRemarkRequest 更新备注请求
type UpdateRemarkRequest struct {
OpenID string `json:"openid" binding:"required"` // 用户openid
Remark string `json:"remark"` // 备注内容
}
// SendTextMessageRequest 发送文本消息请求
type SendTextMessageRequest struct {
OpenID string `json:"openid" binding:"required"` // 用户openid
Content string `json:"content" binding:"required"` // 消息内容
}
// SendImageMessageRequest 发送图片消息请求
type SendImageMessageRequest struct {
OpenID string `json:"openid" binding:"required"` // 用户openid
MediaID string `json:"mediaId" binding:"required"` // 媒体ID
}