优化代码

This commit is contained in:
刘祥超
2022-03-22 21:45:07 +08:00
parent 314362c24d
commit 30bfbdc01e
148 changed files with 340 additions and 315 deletions

View File

@@ -82,7 +82,7 @@ func (this *AuthorityNodeService) FindAllEnabledAuthorityNodes(ctx context.Conte
for _, node := range nodes {
result = append(result, &pb.AuthorityNode{
Id: int64(node.Id),
IsOn: node.IsOn == 1,
IsOn: node.IsOn,
UniqueId: node.UniqueId,
Secret: node.Secret,
Name: node.Name,
@@ -128,7 +128,7 @@ func (this *AuthorityNodeService) ListEnabledAuthorityNodes(ctx context.Context,
for _, node := range nodes {
result = append(result, &pb.AuthorityNode{
Id: int64(node.Id),
IsOn: node.IsOn == 1,
IsOn: node.IsOn,
UniqueId: node.UniqueId,
Secret: node.Secret,
Name: node.Name,
@@ -160,7 +160,7 @@ func (this *AuthorityNodeService) FindEnabledAuthorityNode(ctx context.Context,
result := &pb.AuthorityNode{
Id: int64(node.Id),
IsOn: node.IsOn == 1,
IsOn: node.IsOn,
UniqueId: node.UniqueId,
Secret: node.Secret,
Name: node.Name,
@@ -198,7 +198,7 @@ func (this *AuthorityNodeService) FindCurrentAuthorityNode(ctx context.Context,
result := &pb.AuthorityNode{
Id: int64(node.Id),
IsOn: node.IsOn == 1,
IsOn: node.IsOn,
UniqueId: node.UniqueId,
Secret: node.Secret,
Name: node.Name,