优化代码

This commit is contained in:
刘祥超
2022-03-22 19:30:30 +08:00
parent 8582715be7
commit 314362c24d
90 changed files with 294 additions and 294 deletions

View File

@@ -109,7 +109,7 @@ func (this *NSRouteService) FindEnabledNSRoute(ctx context.Context, req *pb.Find
Id: int64(route.Id),
IsOn: route.IsOn == 1,
Name: route.Name,
RangesJSON: []byte(route.Ranges),
RangesJSON: route.Ranges,
NsCluster: pbCluster,
NsDomain: pbDomain,
}}, nil
@@ -164,7 +164,7 @@ func (this *NSRouteService) FindAllEnabledNSRoutes(ctx context.Context, req *pb.
Id: int64(route.Id),
IsOn: route.IsOn == 1,
Name: route.Name,
RangesJSON: []byte(route.Ranges),
RangesJSON: route.Ranges,
NsCluster: pbCluster,
NsDomain: pbDomain,
})
@@ -218,7 +218,7 @@ func (this *NSRouteService) ListNSRoutesAfterVersion(ctx context.Context, req *p
Id: int64(route.Id),
IsOn: route.IsOn == 1,
Name: "",
RangesJSON: []byte(route.Ranges),
RangesJSON: route.Ranges,
IsDeleted: route.State == nameservers.NSRouteStateDisabled,
Order: int64(route.Order),
Version: int64(route.Version),