feat: 前端显示 SQL 文件执行进度

This commit is contained in:
wanli
2023-10-10 09:24:49 +08:00
committed by kanzihuang
parent 41443dccc0
commit 7544288451
12 changed files with 407 additions and 96 deletions

View File

@@ -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)}
}