mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-30 01:46:37 +08:00
Websocket信息变更时通知更新
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user