mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-04 00:10:25 +08:00
feat: 前端显示 SQL 文件执行进度
This commit is contained in:
@@ -11,7 +11,7 @@ const InfoSysMsgType = 2
|
||||
// websocket消息
|
||||
type SysMsg struct {
|
||||
Type int `json:"type"` // 消息类型
|
||||
Category int `json:"category"` // 消息类别
|
||||
Category string `json:"category"` // 消息类别
|
||||
Title string `json:"title"` // 消息标题
|
||||
Msg string `json:"msg"` // 消息内容
|
||||
}
|
||||
@@ -21,7 +21,7 @@ func (sm *SysMsg) WithTitle(title string) *SysMsg {
|
||||
return sm
|
||||
}
|
||||
|
||||
func (sm *SysMsg) WithCategory(category int) *SysMsg {
|
||||
func (sm *SysMsg) WithCategory(category string) *SysMsg {
|
||||
sm.Category = category
|
||||
return sm
|
||||
}
|
||||
@@ -32,7 +32,7 @@ func (sm *SysMsg) WithMsg(msg any) *SysMsg {
|
||||
}
|
||||
|
||||
// 普通消息
|
||||
func NewSysMsg(title string, msg any) *SysMsg {
|
||||
func InfoSysMsg(title string, msg any) *SysMsg {
|
||||
return &SysMsg{Type: InfoSysMsgType, Title: title, Msg: stringx.AnyToStr(msg)}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user