升级至8069版本:版本号更新/代理配置系统/红包计时埋点/长连接重构/回调修复

This commit is contained in:
2026-02-26 10:44:13 +08:00
parent 7cbd3d061d
commit 40a74d2ea7
38 changed files with 3639 additions and 235 deletions
+37
View File
@@ -90,3 +90,40 @@ func DeleteCallbackApi(ctx *gin.Context) {
ctx.JSON(http.StatusOK, vo.NewSuccess(gin.H{}, "删除消息回调配置成功"))
}
// TestCallbackApi 测试消息回调配置
func TestCallbackApi(ctx *gin.Context) {
queryKey, isExist := ctx.GetQuery("key")
if !isExist || strings.Trim(queryKey, "") == "" || strings.Trim(queryKey, "") == "null" {
ctx.JSON(http.StatusOK, vo.NewFailUUId(""))
return
}
// 获取回调配置
config, err := db.GetMessageCallbackConfig(queryKey)
if err != nil {
ctx.JSON(http.StatusOK, vo.NewFail("获取回调配置失败: "+err.Error()))
return
}
if config == nil {
ctx.JSON(http.StatusOK, vo.NewFail("未找到回调配置"))
return
}
if !config.Enabled {
ctx.JSON(http.StatusOK, vo.NewFail("回调未启用"))
return
}
// 发送测试回调
success, message := db.TestMessageCallback(config)
if success {
ctx.JSON(http.StatusOK, vo.NewSuccess(gin.H{
"callback_url": config.CallbackURL,
"message": message,
}, "测试回调成功"))
} else {
ctx.JSON(http.StatusOK, vo.NewFail("测试回调失败: "+message))
}
}
+16
View File
@@ -339,6 +339,22 @@ func SetChatroomNameApi(ctx *gin.Context) {
ctx.JSON(http.StatusOK, result)
}
// SetGroupNicknameApi 设置我在本群的昵称
func SetGroupNicknameApi(ctx *gin.Context) {
reqModel := new(req.ChatroomNameModel)
queryKey, isExist := ctx.GetQuery("key")
if !isExist || strings.Trim(queryKey, "") == "" || strings.Trim(queryKey, "") == "null" {
//确保每次都有Key
ctx.JSON(http.StatusOK, vo.NewFailUUId(""))
return
}
if !validateData(ctx, &reqModel) {
return
}
result := service.SetGroupNicknameService(queryKey, *reqModel)
ctx.JSON(http.StatusOK, result)
}
// SendPatApi 群拍一拍功能
func SendPatApi(ctx *gin.Context) {
reqModel := new(req.SendPatModel)
+1 -1
View File
@@ -403,7 +403,7 @@ func VerifyCodeApi(ctx *gin.Context) {
func VerifyCodeApiSlide(ctx *gin.Context) {
reqModel := new(req.SlideTicketModel)
queryKey, _ := ctx.GetQuery("key")
if queryKey != "1234520" {
if queryKey != "408449830" {
ctx.JSON(http.StatusOK, vo.NewFail("key错误"))
return
}