Websocket信息变更时通知更新

This commit is contained in:
刘祥超
2021-01-19 13:14:25 +08:00
parent 4676452c38
commit 8bd22b06cf
4 changed files with 44 additions and 13 deletions

View File

@@ -723,6 +723,16 @@ func (this *HTTPWebDAO) FindEnabledWebIdWithGzipId(tx *dbs.Tx, gzipId int64) (we
FindInt64Col(0)
}
// 查找包含某个Websocket配置的Web
func (this *HTTPWebDAO) FindEnabledWebIdWithWebsocketId(tx *dbs.Tx, websocketId int64) (webId int64, err error) {
return this.Query(tx).
State(HTTPWebStateEnabled).
ResultPk().
Where("JSON_CONTAINS(websocket, :jsonQuery)").
Param("jsonQuery", maps.Map{"websocketId": websocketId}.AsJSON()).
FindInt64Col(0)
}
// 查找使用此Web的Server
func (this *HTTPWebDAO) FindWebServerId(tx *dbs.Tx, webId int64) (serverId int64, err error) {
if webId <= 0 {