模块化定时任务,方便在插件中注册任务;增加日志分组

This commit is contained in:
孟帅
2023-06-05 20:14:57 +08:00
parent 62ecbb7f26
commit 48f8c20d9c
79 changed files with 820 additions and 783 deletions

View File

@@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common
import "github.com/gogf/gf/v2/frame/g"
@@ -12,6 +11,7 @@ import "github.com/gogf/gf/v2/frame/g"
type ConsoleStatReq struct {
g.Meta `path:"/console/stat" method:"get" tags:"控制台" summary:"综合数据统计"`
}
type ConsoleStatRes struct {
Visits struct {
DayVisits float64 `json:"dayVisits"`

View File

@@ -3,7 +3,6 @@
// @Copyright Copyright (c) 2023 HotGo CLI
// @Author Ms <133814250@qq.com>
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
//
package common
import (
@@ -15,6 +14,7 @@ type SendTestEmailReq struct {
To string `json:"to" v:"required#接收者邮件不能为空" dc:"接收者邮件,多个用;隔开"`
g.Meta `path:"/ems/sendTest" tags:"邮件" method:"post" summary:"发送测试邮件"`
}
type SendTestEmailRes struct {
}
@@ -22,5 +22,6 @@ type SendTestEmailRes struct {
type SendBindEmsReq struct {
g.Meta `path:"/ems/sendBind" tags:"邮件" method:"post" summary:"发送换绑邮件"`
}
type SendBindEmsRes struct {
}

View File

@@ -15,6 +15,7 @@ import (
type LoginLogoutReq struct {
g.Meta `path:"/site/logout" method:"post" tags:"后台基础" summary:"注销登录"`
}
type LoginLogoutRes struct{}
// RegisterReq 提交账号注册
@@ -22,6 +23,7 @@ type RegisterReq struct {
g.Meta `path:"/site/register" method:"post" tags:"后台基础" summary:"账号注册"`
adminin.RegisterInp
}
type RegisterRes struct {
*adminin.LoginModel
}
@@ -30,6 +32,7 @@ type RegisterRes struct {
type LoginCaptchaReq struct {
g.Meta `path:"/site/captcha" method:"get" tags:"后台基础" summary:"获取登录验证码"`
}
type LoginCaptchaRes struct {
Cid string `json:"cid" dc:"验证码ID"`
Base64 string `json:"base64" dc:"验证码"`
@@ -40,6 +43,7 @@ type AccountLoginReq struct {
g.Meta `path:"/site/accountLogin" method:"post" tags:"后台基础" summary:"账号登录"`
adminin.AccountLoginInp
}
type AccountLoginRes struct {
*adminin.LoginModel
}
@@ -49,6 +53,7 @@ type MobileLoginReq struct {
g.Meta `path:"/site/mobileLogin" method:"post" tags:"后台基础" summary:"手机号登录"`
adminin.MobileLoginInp
}
type MobileLoginRes struct {
*adminin.LoginModel
}
@@ -57,6 +62,7 @@ type MobileLoginRes struct {
type SiteConfigReq struct {
g.Meta `path:"/site/config" method:"get" tags:"后台基础" summary:"获取配置"`
}
type SiteConfigRes struct {
Version string `json:"version" dc:"系统版本"`
WsAddr string `json:"wsAddr" dc:"客户端websocket地址"`
@@ -68,6 +74,7 @@ type SiteConfigRes struct {
type SiteLoginConfigReq struct {
g.Meta `path:"/site/loginConfig" method:"get" tags:"后台基础" summary:"获取登录配置"`
}
type SiteLoginConfigRes struct {
*model.LoginConfig
}
@@ -76,4 +83,5 @@ type SiteLoginConfigRes struct {
type SitePingReq struct {
g.Meta `path:"/site/ping" method:"get" tags:"后台基础" summary:"ping"`
}
type SitePingRes struct{}

View File

@@ -14,6 +14,7 @@ type SendTestSmsReq struct {
Code string `json:"code" v:"required#接收验证码不能为空" dc:"接收验证码"`
g.Meta `path:"/sms/sendTest" tags:"短信" method:"post" summary:"发送测试短信"`
}
type SendTestSmsRes struct {
}
@@ -21,6 +22,7 @@ type SendTestSmsRes struct {
type SendBindSmsReq struct {
g.Meta `path:"/sms/sendBind" tags:"短信" method:"post" summary:"发送换绑短信"`
}
type SendBindSmsRes struct {
}
@@ -30,5 +32,6 @@ type SendSmsReq struct {
Event string `json:"event" v:"required#事件模板不能为空" dc:"事件模板"`
Mobile string `json:"mobile" v:"required#接收手机号不能为空" dc:"接收手机号"`
}
type SendSmsRes struct {
}

View File

@@ -15,6 +15,7 @@ type WechatAuthorizeReq struct {
g.Meta `path:"/wechat/authorize" method:"get" tags:"微信" summary:"微信用户授权"`
commonin.WechatAuthorizeInp
}
type WechatAuthorizeRes struct {
*commonin.WechatAuthorizeModel
}
@@ -24,6 +25,7 @@ type WechatAuthorizeCallReq struct {
g.Meta `path:"/wechat/authorizeCall" method:"get" tags:"微信" summary:"微信用户授权"`
commonin.WechatAuthorizeCallInp
}
type WechatAuthorizeCallRes struct {
*commonin.WechatAuthorizeCallModel
}