修复查询接入网关列表空指针的问题
This commit is contained in:
1 parent
a8327f7f1a
commit
168d11b8e3
1 file changed
+7
@@ -31,6 +31,13 @@ func (r AccessGatewayService) GetGatewayAndReconnectById(accessGatewayId string)
|
||||
|
||||
func (r AccessGatewayService) GetGatewayById(accessGatewayId string) (g *gateway.Gateway, err error) {
|
||||
g = gateway.GlobalGatewayManager.GetById(accessGatewayId)
|
||||
if g == nil {
|
||||
accessGateway, err := r.accessGatewayRepository.FindById(accessGatewayId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
g = r.ReConnect(&accessGateway)
|
||||
}
|
||||
return g, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user