ljw 1 год назад
Родитель
Сommit
4909beee32

+ 105 - 30
docs/admin/admin_docs.go

@@ -353,17 +353,20 @@ const docTemplateadmin = `{
353
                         "token": []
353
                         "token": []
354
                     }
354
                     }
355
                 ],
355
                 ],
356
-                "description": "创建地址簿集合",
356
+                "description": "创建地址簿名称",
357
                 "consumes": [
357
                 "consumes": [
358
                     "application/json"
358
                     "application/json"
359
                 ],
359
                 ],
360
                 "produces": [
360
                 "produces": [
361
                     "application/json"
361
                     "application/json"
362
                 ],
362
                 ],
363
-                "summary": "创建地址簿集合",
363
+                "tags": [
364
+                    "地址簿名称"
365
+                ],
366
+                "summary": "创建地址簿名称",
364
                 "parameters": [
367
                 "parameters": [
365
                     {
368
                     {
366
-                        "description": "地址簿集合信息",
369
+                        "description": "地址簿名称信息",
367
                         "name": "body",
370
                         "name": "body",
368
                         "in": "body",
371
                         "in": "body",
369
                         "required": true,
372
                         "required": true,
@@ -407,17 +410,20 @@ const docTemplateadmin = `{
407
                         "token": []
410
                         "token": []
408
                     }
411
                     }
409
                 ],
412
                 ],
410
-                "description": "地址簿集合删除",
413
+                "description": "地址簿名称删除",
411
                 "consumes": [
414
                 "consumes": [
412
                     "application/json"
415
                     "application/json"
413
                 ],
416
                 ],
414
                 "produces": [
417
                 "produces": [
415
                     "application/json"
418
                     "application/json"
416
                 ],
419
                 ],
417
-                "summary": "地址簿集合删除",
420
+                "tags": [
421
+                    "地址簿名称"
422
+                ],
423
+                "summary": "地址簿名称删除",
418
                 "parameters": [
424
                 "parameters": [
419
                     {
425
                     {
420
-                        "description": "地址簿集合信息",
426
+                        "description": "地址簿名称信息",
421
                         "name": "body",
427
                         "name": "body",
422
                         "in": "body",
428
                         "in": "body",
423
                         "required": true,
429
                         "required": true,
@@ -449,14 +455,17 @@ const docTemplateadmin = `{
449
                         "token": []
455
                         "token": []
450
                     }
456
                     }
451
                 ],
457
                 ],
452
-                "description": "地址簿集合详情",
458
+                "description": "地址簿名称详情",
453
                 "consumes": [
459
                 "consumes": [
454
                     "application/json"
460
                     "application/json"
455
                 ],
461
                 ],
456
                 "produces": [
462
                 "produces": [
457
                     "application/json"
463
                     "application/json"
458
                 ],
464
                 ],
459
-                "summary": "地址簿集合详情",
465
+                "tags": [
466
+                    "地址簿名称"
467
+                ],
468
+                "summary": "地址簿名称详情",
460
                 "parameters": [
469
                 "parameters": [
461
                     {
470
                     {
462
                         "type": "integer",
471
                         "type": "integer",
@@ -501,14 +510,17 @@ const docTemplateadmin = `{
501
                         "token": []
510
                         "token": []
502
                     }
511
                     }
503
                 ],
512
                 ],
504
-                "description": "地址簿集合列表",
513
+                "description": "地址簿名称列表",
505
                 "consumes": [
514
                 "consumes": [
506
                     "application/json"
515
                     "application/json"
507
                 ],
516
                 ],
508
                 "produces": [
517
                 "produces": [
509
                     "application/json"
518
                     "application/json"
510
                 ],
519
                 ],
511
-                "summary": "地址簿集合列表",
520
+                "tags": [
521
+                    "地址簿名称"
522
+                ],
523
+                "summary": "地址簿名称列表",
512
                 "parameters": [
524
                 "parameters": [
513
                     {
525
                     {
514
                         "type": "integer",
526
                         "type": "integer",
@@ -570,17 +582,20 @@ const docTemplateadmin = `{
570
                         "token": []
582
                         "token": []
571
                     }
583
                     }
572
                 ],
584
                 ],
573
-                "description": "地址簿集合编辑",
585
+                "description": "地址簿名称编辑",
574
                 "consumes": [
586
                 "consumes": [
575
                     "application/json"
587
                     "application/json"
576
                 ],
588
                 ],
577
                 "produces": [
589
                 "produces": [
578
                     "application/json"
590
                     "application/json"
579
                 ],
591
                 ],
580
-                "summary": "地址簿集合编辑",
592
+                "tags": [
593
+                    "地址簿名称"
594
+                ],
595
+                "summary": "地址簿名称编辑",
581
                 "parameters": [
596
                 "parameters": [
582
                     {
597
                     {
583
-                        "description": "地址簿集合信息",
598
+                        "description": "地址簿名称信息",
584
                         "name": "body",
599
                         "name": "body",
585
                         "in": "body",
600
                         "in": "body",
586
                         "required": true,
601
                         "required": true,
@@ -624,17 +639,20 @@ const docTemplateadmin = `{
624
                         "token": []
639
                         "token": []
625
                     }
640
                     }
626
                 ],
641
                 ],
627
-                "description": "创建地址簿集合规则",
642
+                "description": "创建地址簿规则",
628
                 "consumes": [
643
                 "consumes": [
629
                     "application/json"
644
                     "application/json"
630
                 ],
645
                 ],
631
                 "produces": [
646
                 "produces": [
632
                     "application/json"
647
                     "application/json"
633
                 ],
648
                 ],
634
-                "summary": "创建地址簿集合规则",
649
+                "tags": [
650
+                    "地址簿规则"
651
+                ],
652
+                "summary": "创建地址簿规则",
635
                 "parameters": [
653
                 "parameters": [
636
                     {
654
                     {
637
-                        "description": "地址簿集合规则信息",
655
+                        "description": "地址簿规则信息",
638
                         "name": "body",
656
                         "name": "body",
639
                         "in": "body",
657
                         "in": "body",
640
                         "required": true,
658
                         "required": true,
@@ -678,17 +696,20 @@ const docTemplateadmin = `{
678
                         "token": []
696
                         "token": []
679
                     }
697
                     }
680
                 ],
698
                 ],
681
-                "description": "地址簿集合规则删除",
699
+                "description": "地址簿规则删除",
682
                 "consumes": [
700
                 "consumes": [
683
                     "application/json"
701
                     "application/json"
684
                 ],
702
                 ],
685
                 "produces": [
703
                 "produces": [
686
                     "application/json"
704
                     "application/json"
687
                 ],
705
                 ],
688
-                "summary": "地址簿集合规则删除",
706
+                "tags": [
707
+                    "地址簿规则"
708
+                ],
709
+                "summary": "地址簿规则删除",
689
                 "parameters": [
710
                 "parameters": [
690
                     {
711
                     {
691
-                        "description": "地址簿集合规则信息",
712
+                        "description": "地址簿规则信息",
692
                         "name": "body",
713
                         "name": "body",
693
                         "in": "body",
714
                         "in": "body",
694
                         "required": true,
715
                         "required": true,
@@ -720,14 +741,17 @@ const docTemplateadmin = `{
720
                         "token": []
741
                         "token": []
721
                     }
742
                     }
722
                 ],
743
                 ],
723
-                "description": "地址簿集合规则详情",
744
+                "description": "地址簿规则详情",
724
                 "consumes": [
745
                 "consumes": [
725
                     "application/json"
746
                     "application/json"
726
                 ],
747
                 ],
727
                 "produces": [
748
                 "produces": [
728
                     "application/json"
749
                     "application/json"
729
                 ],
750
                 ],
730
-                "summary": "地址簿集合规则详情",
751
+                "tags": [
752
+                    "地址簿规则"
753
+                ],
754
+                "summary": "地址簿规则详情",
731
                 "parameters": [
755
                 "parameters": [
732
                     {
756
                     {
733
                         "type": "integer",
757
                         "type": "integer",
@@ -772,14 +796,17 @@ const docTemplateadmin = `{
772
                         "token": []
796
                         "token": []
773
                     }
797
                     }
774
                 ],
798
                 ],
775
-                "description": "地址簿集合规则列表",
799
+                "description": "地址簿规则列表",
776
                 "consumes": [
800
                 "consumes": [
777
                     "application/json"
801
                     "application/json"
778
                 ],
802
                 ],
779
                 "produces": [
803
                 "produces": [
780
                     "application/json"
804
                     "application/json"
781
                 ],
805
                 ],
782
-                "summary": "地址簿集合规则列表",
806
+                "tags": [
807
+                    "地址簿规则"
808
+                ],
809
+                "summary": "地址簿规则列表",
783
                 "parameters": [
810
                 "parameters": [
784
                     {
811
                     {
785
                         "type": "integer",
812
                         "type": "integer",
@@ -847,17 +874,20 @@ const docTemplateadmin = `{
847
                         "token": []
874
                         "token": []
848
                     }
875
                     }
849
                 ],
876
                 ],
850
-                "description": "地址簿集合规则编辑",
877
+                "description": "地址簿规则编辑",
851
                 "consumes": [
878
                 "consumes": [
852
                     "application/json"
879
                     "application/json"
853
                 ],
880
                 ],
854
                 "produces": [
881
                 "produces": [
855
                     "application/json"
882
                     "application/json"
856
                 ],
883
                 ],
857
-                "summary": "地址簿集合规则编辑",
884
+                "tags": [
885
+                    "地址簿规则"
886
+                ],
887
+                "summary": "地址簿规则编辑",
858
                 "parameters": [
888
                 "parameters": [
859
                     {
889
                     {
860
-                        "description": "地址簿集合规则信息",
890
+                        "description": "地址簿规则信息",
861
                         "name": "body",
891
                         "name": "body",
862
                         "in": "body",
892
                         "in": "body",
863
                         "required": true,
893
                         "required": true,
@@ -2011,6 +2041,51 @@ const docTemplateadmin = `{
2011
                 }
2041
                 }
2012
             }
2042
             }
2013
         },
2043
         },
2044
+        "/admin/peer/batchDelete": {
2045
+            "post": {
2046
+                "security": [
2047
+                    {
2048
+                        "token": []
2049
+                    }
2050
+                ],
2051
+                "description": "批量设备删除",
2052
+                "consumes": [
2053
+                    "application/json"
2054
+                ],
2055
+                "produces": [
2056
+                    "application/json"
2057
+                ],
2058
+                "tags": [
2059
+                    "设备"
2060
+                ],
2061
+                "summary": "批量设备删除",
2062
+                "parameters": [
2063
+                    {
2064
+                        "description": "设备id",
2065
+                        "name": "body",
2066
+                        "in": "body",
2067
+                        "required": true,
2068
+                        "schema": {
2069
+                            "$ref": "#/definitions/admin.PeerBatchDeleteForm"
2070
+                        }
2071
+                    }
2072
+                ],
2073
+                "responses": {
2074
+                    "200": {
2075
+                        "description": "OK",
2076
+                        "schema": {
2077
+                            "$ref": "#/definitions/response.Response"
2078
+                        }
2079
+                    },
2080
+                    "500": {
2081
+                        "description": "Internal Server Error",
2082
+                        "schema": {
2083
+                            "$ref": "#/definitions/response.Response"
2084
+                        }
2085
+                    }
2086
+                }
2087
+            }
2088
+        },
2014
         "/admin/peer/create": {
2089
         "/admin/peer/create": {
2015
             "post": {
2090
             "post": {
2016
                 "security": [
2091
                 "security": [
@@ -2075,7 +2150,7 @@ const docTemplateadmin = `{
2075
                         "token": []
2150
                         "token": []
2076
                     }
2151
                     }
2077
                 ],
2152
                 ],
2078
-                "description": "批量设备删除",
2153
+                "description": "设备删除",
2079
                 "consumes": [
2154
                 "consumes": [
2080
                     "application/json"
2155
                     "application/json"
2081
                 ],
2156
                 ],
@@ -2085,15 +2160,15 @@ const docTemplateadmin = `{
2085
                 "tags": [
2160
                 "tags": [
2086
                     "设备"
2161
                     "设备"
2087
                 ],
2162
                 ],
2088
-                "summary": "批量设备删除",
2163
+                "summary": "设备删除",
2089
                 "parameters": [
2164
                 "parameters": [
2090
                     {
2165
                     {
2091
-                        "description": "设备id",
2166
+                        "description": "设备信息",
2092
                         "name": "body",
2167
                         "name": "body",
2093
                         "in": "body",
2168
                         "in": "body",
2094
                         "required": true,
2169
                         "required": true,
2095
                         "schema": {
2170
                         "schema": {
2096
-                            "$ref": "#/definitions/admin.PeerBatchDeleteForm"
2171
+                            "$ref": "#/definitions/admin.PeerForm"
2097
                         }
2172
                         }
2098
                     }
2173
                     }
2099
                 ],
2174
                 ],

+ 105 - 30
docs/admin/admin_swagger.json

@@ -346,17 +346,20 @@
346
                         "token": []
346
                         "token": []
347
                     }
347
                     }
348
                 ],
348
                 ],
349
-                "description": "创建地址簿集合",
349
+                "description": "创建地址簿名称",
350
                 "consumes": [
350
                 "consumes": [
351
                     "application/json"
351
                     "application/json"
352
                 ],
352
                 ],
353
                 "produces": [
353
                 "produces": [
354
                     "application/json"
354
                     "application/json"
355
                 ],
355
                 ],
356
-                "summary": "创建地址簿集合",
356
+                "tags": [
357
+                    "地址簿名称"
358
+                ],
359
+                "summary": "创建地址簿名称",
357
                 "parameters": [
360
                 "parameters": [
358
                     {
361
                     {
359
-                        "description": "地址簿集合信息",
362
+                        "description": "地址簿名称信息",
360
                         "name": "body",
363
                         "name": "body",
361
                         "in": "body",
364
                         "in": "body",
362
                         "required": true,
365
                         "required": true,
@@ -400,17 +403,20 @@
400
                         "token": []
403
                         "token": []
401
                     }
404
                     }
402
                 ],
405
                 ],
403
-                "description": "地址簿集合删除",
406
+                "description": "地址簿名称删除",
404
                 "consumes": [
407
                 "consumes": [
405
                     "application/json"
408
                     "application/json"
406
                 ],
409
                 ],
407
                 "produces": [
410
                 "produces": [
408
                     "application/json"
411
                     "application/json"
409
                 ],
412
                 ],
410
-                "summary": "地址簿集合删除",
413
+                "tags": [
414
+                    "地址簿名称"
415
+                ],
416
+                "summary": "地址簿名称删除",
411
                 "parameters": [
417
                 "parameters": [
412
                     {
418
                     {
413
-                        "description": "地址簿集合信息",
419
+                        "description": "地址簿名称信息",
414
                         "name": "body",
420
                         "name": "body",
415
                         "in": "body",
421
                         "in": "body",
416
                         "required": true,
422
                         "required": true,
@@ -442,14 +448,17 @@
442
                         "token": []
448
                         "token": []
443
                     }
449
                     }
444
                 ],
450
                 ],
445
-                "description": "地址簿集合详情",
451
+                "description": "地址簿名称详情",
446
                 "consumes": [
452
                 "consumes": [
447
                     "application/json"
453
                     "application/json"
448
                 ],
454
                 ],
449
                 "produces": [
455
                 "produces": [
450
                     "application/json"
456
                     "application/json"
451
                 ],
457
                 ],
452
-                "summary": "地址簿集合详情",
458
+                "tags": [
459
+                    "地址簿名称"
460
+                ],
461
+                "summary": "地址簿名称详情",
453
                 "parameters": [
462
                 "parameters": [
454
                     {
463
                     {
455
                         "type": "integer",
464
                         "type": "integer",
@@ -494,14 +503,17 @@
494
                         "token": []
503
                         "token": []
495
                     }
504
                     }
496
                 ],
505
                 ],
497
-                "description": "地址簿集合列表",
506
+                "description": "地址簿名称列表",
498
                 "consumes": [
507
                 "consumes": [
499
                     "application/json"
508
                     "application/json"
500
                 ],
509
                 ],
501
                 "produces": [
510
                 "produces": [
502
                     "application/json"
511
                     "application/json"
503
                 ],
512
                 ],
504
-                "summary": "地址簿集合列表",
513
+                "tags": [
514
+                    "地址簿名称"
515
+                ],
516
+                "summary": "地址簿名称列表",
505
                 "parameters": [
517
                 "parameters": [
506
                     {
518
                     {
507
                         "type": "integer",
519
                         "type": "integer",
@@ -563,17 +575,20 @@
563
                         "token": []
575
                         "token": []
564
                     }
576
                     }
565
                 ],
577
                 ],
566
-                "description": "地址簿集合编辑",
578
+                "description": "地址簿名称编辑",
567
                 "consumes": [
579
                 "consumes": [
568
                     "application/json"
580
                     "application/json"
569
                 ],
581
                 ],
570
                 "produces": [
582
                 "produces": [
571
                     "application/json"
583
                     "application/json"
572
                 ],
584
                 ],
573
-                "summary": "地址簿集合编辑",
585
+                "tags": [
586
+                    "地址簿名称"
587
+                ],
588
+                "summary": "地址簿名称编辑",
574
                 "parameters": [
589
                 "parameters": [
575
                     {
590
                     {
576
-                        "description": "地址簿集合信息",
591
+                        "description": "地址簿名称信息",
577
                         "name": "body",
592
                         "name": "body",
578
                         "in": "body",
593
                         "in": "body",
579
                         "required": true,
594
                         "required": true,
@@ -617,17 +632,20 @@
617
                         "token": []
632
                         "token": []
618
                     }
633
                     }
619
                 ],
634
                 ],
620
-                "description": "创建地址簿集合规则",
635
+                "description": "创建地址簿规则",
621
                 "consumes": [
636
                 "consumes": [
622
                     "application/json"
637
                     "application/json"
623
                 ],
638
                 ],
624
                 "produces": [
639
                 "produces": [
625
                     "application/json"
640
                     "application/json"
626
                 ],
641
                 ],
627
-                "summary": "创建地址簿集合规则",
642
+                "tags": [
643
+                    "地址簿规则"
644
+                ],
645
+                "summary": "创建地址簿规则",
628
                 "parameters": [
646
                 "parameters": [
629
                     {
647
                     {
630
-                        "description": "地址簿集合规则信息",
648
+                        "description": "地址簿规则信息",
631
                         "name": "body",
649
                         "name": "body",
632
                         "in": "body",
650
                         "in": "body",
633
                         "required": true,
651
                         "required": true,
@@ -671,17 +689,20 @@
671
                         "token": []
689
                         "token": []
672
                     }
690
                     }
673
                 ],
691
                 ],
674
-                "description": "地址簿集合规则删除",
692
+                "description": "地址簿规则删除",
675
                 "consumes": [
693
                 "consumes": [
676
                     "application/json"
694
                     "application/json"
677
                 ],
695
                 ],
678
                 "produces": [
696
                 "produces": [
679
                     "application/json"
697
                     "application/json"
680
                 ],
698
                 ],
681
-                "summary": "地址簿集合规则删除",
699
+                "tags": [
700
+                    "地址簿规则"
701
+                ],
702
+                "summary": "地址簿规则删除",
682
                 "parameters": [
703
                 "parameters": [
683
                     {
704
                     {
684
-                        "description": "地址簿集合规则信息",
705
+                        "description": "地址簿规则信息",
685
                         "name": "body",
706
                         "name": "body",
686
                         "in": "body",
707
                         "in": "body",
687
                         "required": true,
708
                         "required": true,
@@ -713,14 +734,17 @@
713
                         "token": []
734
                         "token": []
714
                     }
735
                     }
715
                 ],
736
                 ],
716
-                "description": "地址簿集合规则详情",
737
+                "description": "地址簿规则详情",
717
                 "consumes": [
738
                 "consumes": [
718
                     "application/json"
739
                     "application/json"
719
                 ],
740
                 ],
720
                 "produces": [
741
                 "produces": [
721
                     "application/json"
742
                     "application/json"
722
                 ],
743
                 ],
723
-                "summary": "地址簿集合规则详情",
744
+                "tags": [
745
+                    "地址簿规则"
746
+                ],
747
+                "summary": "地址簿规则详情",
724
                 "parameters": [
748
                 "parameters": [
725
                     {
749
                     {
726
                         "type": "integer",
750
                         "type": "integer",
@@ -765,14 +789,17 @@
765
                         "token": []
789
                         "token": []
766
                     }
790
                     }
767
                 ],
791
                 ],
768
-                "description": "地址簿集合规则列表",
792
+                "description": "地址簿规则列表",
769
                 "consumes": [
793
                 "consumes": [
770
                     "application/json"
794
                     "application/json"
771
                 ],
795
                 ],
772
                 "produces": [
796
                 "produces": [
773
                     "application/json"
797
                     "application/json"
774
                 ],
798
                 ],
775
-                "summary": "地址簿集合规则列表",
799
+                "tags": [
800
+                    "地址簿规则"
801
+                ],
802
+                "summary": "地址簿规则列表",
776
                 "parameters": [
803
                 "parameters": [
777
                     {
804
                     {
778
                         "type": "integer",
805
                         "type": "integer",
@@ -840,17 +867,20 @@
840
                         "token": []
867
                         "token": []
841
                     }
868
                     }
842
                 ],
869
                 ],
843
-                "description": "地址簿集合规则编辑",
870
+                "description": "地址簿规则编辑",
844
                 "consumes": [
871
                 "consumes": [
845
                     "application/json"
872
                     "application/json"
846
                 ],
873
                 ],
847
                 "produces": [
874
                 "produces": [
848
                     "application/json"
875
                     "application/json"
849
                 ],
876
                 ],
850
-                "summary": "地址簿集合规则编辑",
877
+                "tags": [
878
+                    "地址簿规则"
879
+                ],
880
+                "summary": "地址簿规则编辑",
851
                 "parameters": [
881
                 "parameters": [
852
                     {
882
                     {
853
-                        "description": "地址簿集合规则信息",
883
+                        "description": "地址簿规则信息",
854
                         "name": "body",
884
                         "name": "body",
855
                         "in": "body",
885
                         "in": "body",
856
                         "required": true,
886
                         "required": true,
@@ -2004,6 +2034,51 @@
2004
                 }
2034
                 }
2005
             }
2035
             }
2006
         },
2036
         },
2037
+        "/admin/peer/batchDelete": {
2038
+            "post": {
2039
+                "security": [
2040
+                    {
2041
+                        "token": []
2042
+                    }
2043
+                ],
2044
+                "description": "批量设备删除",
2045
+                "consumes": [
2046
+                    "application/json"
2047
+                ],
2048
+                "produces": [
2049
+                    "application/json"
2050
+                ],
2051
+                "tags": [
2052
+                    "设备"
2053
+                ],
2054
+                "summary": "批量设备删除",
2055
+                "parameters": [
2056
+                    {
2057
+                        "description": "设备id",
2058
+                        "name": "body",
2059
+                        "in": "body",
2060
+                        "required": true,
2061
+                        "schema": {
2062
+                            "$ref": "#/definitions/admin.PeerBatchDeleteForm"
2063
+                        }
2064
+                    }
2065
+                ],
2066
+                "responses": {
2067
+                    "200": {
2068
+                        "description": "OK",
2069
+                        "schema": {
2070
+                            "$ref": "#/definitions/response.Response"
2071
+                        }
2072
+                    },
2073
+                    "500": {
2074
+                        "description": "Internal Server Error",
2075
+                        "schema": {
2076
+                            "$ref": "#/definitions/response.Response"
2077
+                        }
2078
+                    }
2079
+                }
2080
+            }
2081
+        },
2007
         "/admin/peer/create": {
2082
         "/admin/peer/create": {
2008
             "post": {
2083
             "post": {
2009
                 "security": [
2084
                 "security": [
@@ -2068,7 +2143,7 @@
2068
                         "token": []
2143
                         "token": []
2069
                     }
2144
                     }
2070
                 ],
2145
                 ],
2071
-                "description": "批量设备删除",
2146
+                "description": "设备删除",
2072
                 "consumes": [
2147
                 "consumes": [
2073
                     "application/json"
2148
                     "application/json"
2074
                 ],
2149
                 ],
@@ -2078,15 +2153,15 @@
2078
                 "tags": [
2153
                 "tags": [
2079
                     "设备"
2154
                     "设备"
2080
                 ],
2155
                 ],
2081
-                "summary": "批量设备删除",
2156
+                "summary": "设备删除",
2082
                 "parameters": [
2157
                 "parameters": [
2083
                     {
2158
                     {
2084
-                        "description": "设备id",
2159
+                        "description": "设备信息",
2085
                         "name": "body",
2160
                         "name": "body",
2086
                         "in": "body",
2161
                         "in": "body",
2087
                         "required": true,
2162
                         "required": true,
2088
                         "schema": {
2163
                         "schema": {
2089
-                            "$ref": "#/definitions/admin.PeerBatchDeleteForm"
2164
+                            "$ref": "#/definitions/admin.PeerForm"
2090
                         }
2165
                         }
2091
                     }
2166
                     }
2092
                 ],
2167
                 ],

+ 78 - 30
docs/admin/admin_swagger.yaml

@@ -903,9 +903,9 @@ paths:
903
     post:
903
     post:
904
       consumes:
904
       consumes:
905
       - application/json
905
       - application/json
906
-      description: 创建地址簿集合
906
+      description: 创建地址簿名称
907
       parameters:
907
       parameters:
908
-      - description: 地址簿集合信息
908
+      - description: 地址簿名称信息
909
         in: body
909
         in: body
910
         name: body
910
         name: body
911
         required: true
911
         required: true
@@ -929,14 +929,16 @@ paths:
929
             $ref: '#/definitions/response.Response'
929
             $ref: '#/definitions/response.Response'
930
       security:
930
       security:
931
       - token: []
931
       - token: []
932
-      summary: 创建地址簿集合
932
+      summary: 创建地址簿名称
933
+      tags:
934
+      - 地址簿名称
933
   /admin/address_book_collection/delete:
935
   /admin/address_book_collection/delete:
934
     post:
936
     post:
935
       consumes:
937
       consumes:
936
       - application/json
938
       - application/json
937
-      description: 地址簿集合删除
939
+      description: 地址簿名称删除
938
       parameters:
940
       parameters:
939
-      - description: 地址簿集合信息
941
+      - description: 地址簿名称信息
940
         in: body
942
         in: body
941
         name: body
943
         name: body
942
         required: true
944
         required: true
@@ -955,12 +957,14 @@ paths:
955
             $ref: '#/definitions/response.Response'
957
             $ref: '#/definitions/response.Response'
956
       security:
958
       security:
957
       - token: []
959
       - token: []
958
-      summary: 地址簿集合删除
960
+      summary: 地址簿名称删除
961
+      tags:
962
+      - 地址簿名称
959
   /admin/address_book_collection/detail/{id}:
963
   /admin/address_book_collection/detail/{id}:
960
     get:
964
     get:
961
       consumes:
965
       consumes:
962
       - application/json
966
       - application/json
963
-      description: 地址簿集合详情
967
+      description: 地址簿名称详情
964
       parameters:
968
       parameters:
965
       - description: ID
969
       - description: ID
966
         in: path
970
         in: path
@@ -985,12 +989,14 @@ paths:
985
             $ref: '#/definitions/response.Response'
989
             $ref: '#/definitions/response.Response'
986
       security:
990
       security:
987
       - token: []
991
       - token: []
988
-      summary: 地址簿集合详情
992
+      summary: 地址簿名称详情
993
+      tags:
994
+      - 地址簿名称
989
   /admin/address_book_collection/list:
995
   /admin/address_book_collection/list:
990
     get:
996
     get:
991
       consumes:
997
       consumes:
992
       - application/json
998
       - application/json
993
-      description: 地址簿集合列表
999
+      description: 地址簿名称列表
994
       parameters:
1000
       parameters:
995
       - description: 页码
1001
       - description: 页码
996
         in: query
1002
         in: query
@@ -1026,14 +1032,16 @@ paths:
1026
             $ref: '#/definitions/response.Response'
1032
             $ref: '#/definitions/response.Response'
1027
       security:
1033
       security:
1028
       - token: []
1034
       - token: []
1029
-      summary: 地址簿集合列表
1035
+      summary: 地址簿名称列表
1036
+      tags:
1037
+      - 地址簿名称
1030
   /admin/address_book_collection/update:
1038
   /admin/address_book_collection/update:
1031
     post:
1039
     post:
1032
       consumes:
1040
       consumes:
1033
       - application/json
1041
       - application/json
1034
-      description: 地址簿集合编辑
1042
+      description: 地址簿名称编辑
1035
       parameters:
1043
       parameters:
1036
-      - description: 地址簿集合信息
1044
+      - description: 地址簿名称信息
1037
         in: body
1045
         in: body
1038
         name: body
1046
         name: body
1039
         required: true
1047
         required: true
@@ -1057,14 +1065,16 @@ paths:
1057
             $ref: '#/definitions/response.Response'
1065
             $ref: '#/definitions/response.Response'
1058
       security:
1066
       security:
1059
       - token: []
1067
       - token: []
1060
-      summary: 地址簿集合编辑
1068
+      summary: 地址簿名称编辑
1069
+      tags:
1070
+      - 地址簿名称
1061
   /admin/address_book_collection_rule/create:
1071
   /admin/address_book_collection_rule/create:
1062
     post:
1072
     post:
1063
       consumes:
1073
       consumes:
1064
       - application/json
1074
       - application/json
1065
-      description: 创建地址簿集合规则
1075
+      description: 创建地址簿规则
1066
       parameters:
1076
       parameters:
1067
-      - description: 地址簿集合规则信息
1077
+      - description: 地址簿规则信息
1068
         in: body
1078
         in: body
1069
         name: body
1079
         name: body
1070
         required: true
1080
         required: true
@@ -1088,14 +1098,16 @@ paths:
1088
             $ref: '#/definitions/response.Response'
1098
             $ref: '#/definitions/response.Response'
1089
       security:
1099
       security:
1090
       - token: []
1100
       - token: []
1091
-      summary: 创建地址簿集合规则
1101
+      summary: 创建地址簿规则
1102
+      tags:
1103
+      - 地址簿规则
1092
   /admin/address_book_collection_rule/delete:
1104
   /admin/address_book_collection_rule/delete:
1093
     post:
1105
     post:
1094
       consumes:
1106
       consumes:
1095
       - application/json
1107
       - application/json
1096
-      description: 地址簿集合规则删除
1108
+      description: 地址簿规则删除
1097
       parameters:
1109
       parameters:
1098
-      - description: 地址簿集合规则信息
1110
+      - description: 地址簿规则信息
1099
         in: body
1111
         in: body
1100
         name: body
1112
         name: body
1101
         required: true
1113
         required: true
@@ -1114,12 +1126,14 @@ paths:
1114
             $ref: '#/definitions/response.Response'
1126
             $ref: '#/definitions/response.Response'
1115
       security:
1127
       security:
1116
       - token: []
1128
       - token: []
1117
-      summary: 地址簿集合规则删除
1129
+      summary: 地址簿规则删除
1130
+      tags:
1131
+      - 地址簿规则
1118
   /admin/address_book_collection_rule/detail/{id}:
1132
   /admin/address_book_collection_rule/detail/{id}:
1119
     get:
1133
     get:
1120
       consumes:
1134
       consumes:
1121
       - application/json
1135
       - application/json
1122
-      description: 地址簿集合规则详情
1136
+      description: 地址簿规则详情
1123
       parameters:
1137
       parameters:
1124
       - description: ID
1138
       - description: ID
1125
         in: path
1139
         in: path
@@ -1144,12 +1158,14 @@ paths:
1144
             $ref: '#/definitions/response.Response'
1158
             $ref: '#/definitions/response.Response'
1145
       security:
1159
       security:
1146
       - token: []
1160
       - token: []
1147
-      summary: 地址簿集合规则详情
1161
+      summary: 地址簿规则详情
1162
+      tags:
1163
+      - 地址簿规则
1148
   /admin/address_book_collection_rule/list:
1164
   /admin/address_book_collection_rule/list:
1149
     get:
1165
     get:
1150
       consumes:
1166
       consumes:
1151
       - application/json
1167
       - application/json
1152
-      description: 地址簿集合规则列表
1168
+      description: 地址簿规则列表
1153
       parameters:
1169
       parameters:
1154
       - description: 页码
1170
       - description: 页码
1155
         in: query
1171
         in: query
@@ -1189,14 +1205,16 @@ paths:
1189
             $ref: '#/definitions/response.Response'
1205
             $ref: '#/definitions/response.Response'
1190
       security:
1206
       security:
1191
       - token: []
1207
       - token: []
1192
-      summary: 地址簿集合规则列表
1208
+      summary: 地址簿规则列表
1209
+      tags:
1210
+      - 地址簿规则
1193
   /admin/address_book_collection_rule/update:
1211
   /admin/address_book_collection_rule/update:
1194
     post:
1212
     post:
1195
       consumes:
1213
       consumes:
1196
       - application/json
1214
       - application/json
1197
-      description: 地址簿集合规则编辑
1215
+      description: 地址簿规则编辑
1198
       parameters:
1216
       parameters:
1199
-      - description: 地址簿集合规则信息
1217
+      - description: 地址簿规则信息
1200
         in: body
1218
         in: body
1201
         name: body
1219
         name: body
1202
         required: true
1220
         required: true
@@ -1220,7 +1238,9 @@ paths:
1220
             $ref: '#/definitions/response.Response'
1238
             $ref: '#/definitions/response.Response'
1221
       security:
1239
       security:
1222
       - token: []
1240
       - token: []
1223
-      summary: 地址簿集合规则编辑
1241
+      summary: 地址簿规则编辑
1242
+      tags:
1243
+      - 地址簿规则
1224
   /admin/app-config:
1244
   /admin/app-config:
1225
     get:
1245
     get:
1226
       consumes:
1246
       consumes:
@@ -1890,6 +1910,34 @@ paths:
1890
       summary: OidcAuthQuery
1910
       summary: OidcAuthQuery
1891
       tags:
1911
       tags:
1892
       - Oauth
1912
       - Oauth
1913
+  /admin/peer/batchDelete:
1914
+    post:
1915
+      consumes:
1916
+      - application/json
1917
+      description: 批量设备删除
1918
+      parameters:
1919
+      - description: 设备id
1920
+        in: body
1921
+        name: body
1922
+        required: true
1923
+        schema:
1924
+          $ref: '#/definitions/admin.PeerBatchDeleteForm'
1925
+      produces:
1926
+      - application/json
1927
+      responses:
1928
+        "200":
1929
+          description: OK
1930
+          schema:
1931
+            $ref: '#/definitions/response.Response'
1932
+        "500":
1933
+          description: Internal Server Error
1934
+          schema:
1935
+            $ref: '#/definitions/response.Response'
1936
+      security:
1937
+      - token: []
1938
+      summary: 批量设备删除
1939
+      tags:
1940
+      - 设备
1893
   /admin/peer/create:
1941
   /admin/peer/create:
1894
     post:
1942
     post:
1895
       consumes:
1943
       consumes:
@@ -1927,14 +1975,14 @@ paths:
1927
     post:
1975
     post:
1928
       consumes:
1976
       consumes:
1929
       - application/json
1977
       - application/json
1930
-      description: 批量设备删除
1978
+      description: 设备删除
1931
       parameters:
1979
       parameters:
1932
-      - description: 设备id
1980
+      - description: 设备信息
1933
         in: body
1981
         in: body
1934
         name: body
1982
         name: body
1935
         required: true
1983
         required: true
1936
         schema:
1984
         schema:
1937
-          $ref: '#/definitions/admin.PeerBatchDeleteForm'
1985
+          $ref: '#/definitions/admin.PeerForm'
1938
       produces:
1986
       produces:
1939
       - application/json
1987
       - application/json
1940
       responses:
1988
       responses:
@@ -1948,7 +1996,7 @@ paths:
1948
             $ref: '#/definitions/response.Response'
1996
             $ref: '#/definitions/response.Response'
1949
       security:
1997
       security:
1950
       - token: []
1998
       - token: []
1951
-      summary: 批量设备删除
1999
+      summary: 设备删除
1952
       tags:
2000
       tags:
1953
       - 设备
2001
       - 设备
1954
   /admin/peer/detail/{id}:
2002
   /admin/peer/detail/{id}:

+ 20 - 20
http/controller/admin/addressBookCollection.go

@@ -14,10 +14,10 @@ import (
14
 type AddressBookCollection struct {
14
 type AddressBookCollection struct {
15
 }
15
 }
16
 
16
 
17
-// Detail 地址簿集合
18
-// @AddressBookCollections 地址簿集合
19
-// @Summary 地址簿集合详情
20
-// @Description 地址簿集合详情
17
+// Detail 地址簿名称
18
+// @Tags 地址簿名称
19
+// @Summary 地址簿名称详情
20
+// @Description 地址簿名称详情
21
 // @Accept  json
21
 // @Accept  json
22
 // @Produce  json
22
 // @Produce  json
23
 // @Param id path int true "ID"
23
 // @Param id path int true "ID"
@@ -42,13 +42,13 @@ func (abc *AddressBookCollection) Detail(c *gin.Context) {
42
 	return
42
 	return
43
 }
43
 }
44
 
44
 
45
-// Create 创建地址簿集合
46
-// @AddressBookCollections 地址簿集合
47
-// @Summary 创建地址簿集合
48
-// @Description 创建地址簿集合
45
+// Create 创建地址簿名称
46
+// @Tags 地址簿名称
47
+// @Summary 创建地址簿名称
48
+// @Description 创建地址簿名称
49
 // @Accept  json
49
 // @Accept  json
50
 // @Produce  json
50
 // @Produce  json
51
-// @Param body body model.AddressBookCollection true "地址簿集合信息"
51
+// @Param body body model.AddressBookCollection true "地址簿名称信息"
52
 // @Success 200 {object} response.Response{data=model.AddressBookCollection}
52
 // @Success 200 {object} response.Response{data=model.AddressBookCollection}
53
 // @Failure 500 {object} response.Response
53
 // @Failure 500 {object} response.Response
54
 // @Router /admin/address_book_collection/create [post]
54
 // @Router /admin/address_book_collection/create [post]
@@ -79,9 +79,9 @@ func (abc *AddressBookCollection) Create(c *gin.Context) {
79
 }
79
 }
80
 
80
 
81
 // List 列表
81
 // List 列表
82
-// @AddressBookCollections 地址簿集合
83
-// @Summary 地址簿集合列表
84
-// @Description 地址簿集合列表
82
+// @Tags 地址簿名称
83
+// @Summary 地址簿名称列表
84
+// @Description 地址簿名称列表
85
 // @Accept  json
85
 // @Accept  json
86
 // @Produce  json
86
 // @Produce  json
87
 // @Param page query int false "页码"
87
 // @Param page query int false "页码"
@@ -111,12 +111,12 @@ func (abc *AddressBookCollection) List(c *gin.Context) {
111
 }
111
 }
112
 
112
 
113
 // Update 编辑
113
 // Update 编辑
114
-// @AddressBookCollections 地址簿集合
115
-// @Summary 地址簿集合编辑
116
-// @Description 地址簿集合编辑
114
+// @Tags 地址簿名称
115
+// @Summary 地址簿名称编辑
116
+// @Description 地址簿名称编辑
117
 // @Accept  json
117
 // @Accept  json
118
 // @Produce  json
118
 // @Produce  json
119
-// @Param body body model.AddressBookCollection true "地址簿集合信息"
119
+// @Param body body model.AddressBookCollection true "地址簿名称信息"
120
 // @Success 200 {object} response.Response{data=model.AddressBookCollection}
120
 // @Success 200 {object} response.Response{data=model.AddressBookCollection}
121
 // @Failure 500 {object} response.Response
121
 // @Failure 500 {object} response.Response
122
 // @Router /admin/address_book_collection/update [post]
122
 // @Router /admin/address_book_collection/update [post]
@@ -151,12 +151,12 @@ func (abc *AddressBookCollection) Update(c *gin.Context) {
151
 }
151
 }
152
 
152
 
153
 // Delete 删除
153
 // Delete 删除
154
-// @AddressBookCollections 地址簿集合
155
-// @Summary 地址簿集合删除
156
-// @Description 地址簿集合删除
154
+// @Tags 地址簿名称
155
+// @Summary 地址簿名称删除
156
+// @Description 地址簿名称删除
157
 // @Accept  json
157
 // @Accept  json
158
 // @Produce  json
158
 // @Produce  json
159
-// @Param body body model.AddressBookCollection true "地址簿集合信息"
159
+// @Param body body model.AddressBookCollection true "地址簿名称信息"
160
 // @Success 200 {object} response.Response
160
 // @Success 200 {object} response.Response
161
 // @Failure 500 {object} response.Response
161
 // @Failure 500 {object} response.Response
162
 // @Router /admin/address_book_collection/delete [post]
162
 // @Router /admin/address_book_collection/delete [post]

+ 20 - 20
http/controller/admin/addressBookCollectionRule.go

@@ -15,9 +15,9 @@ type AddressBookCollectionRule struct {
15
 }
15
 }
16
 
16
 
17
 // List 列表
17
 // List 列表
18
-// @AddressBookCollectionRule 地址簿集合规则
19
-// @Summary 地址簿集合规则列表
20
-// @Description 地址簿集合规则列表
18
+// @Tags 地址簿规则
19
+// @Summary 地址簿规则列表
20
+// @Description 地址簿规则列表
21
 // @Accept  json
21
 // @Accept  json
22
 // @Produce  json
22
 // @Produce  json
23
 // @Param page query int false "页码"
23
 // @Param page query int false "页码"
@@ -51,10 +51,10 @@ func (abcr *AddressBookCollectionRule) List(c *gin.Context) {
51
 	response.Success(c, res)
51
 	response.Success(c, res)
52
 }
52
 }
53
 
53
 
54
-// Detail 地址簿集合规则
55
-// @AddressBookCollectionRule 地址簿集合规则
56
-// @Summary 地址簿集合规则详情
57
-// @Description 地址簿集合规则详情
54
+// Detail 地址簿规则
55
+// @Tags 地址簿规则
56
+// @Summary 地址簿规则详情
57
+// @Description 地址簿规则详情
58
 // @Accept  json
58
 // @Accept  json
59
 // @Produce  json
59
 // @Produce  json
60
 // @Param id path int true "ID"
60
 // @Param id path int true "ID"
@@ -79,13 +79,13 @@ func (abcr *AddressBookCollectionRule) Detail(c *gin.Context) {
79
 	return
79
 	return
80
 }
80
 }
81
 
81
 
82
-// Create 创建地址簿集合规则
83
-// @AddressBookCollectionRule 地址簿集合规则
84
-// @Summary 创建地址簿集合规则
85
-// @Description 创建地址簿集合规则
82
+// Create 创建地址簿规则
83
+// @Tags 地址簿规则
84
+// @Summary 创建地址簿规则
85
+// @Description 创建地址簿规则
86
 // @Accept  json
86
 // @Accept  json
87
 // @Produce  json
87
 // @Produce  json
88
-// @Param body body model.AddressBookCollectionRule true "地址簿集合规则信息"
88
+// @Param body body model.AddressBookCollectionRule true "地址簿规则信息"
89
 // @Success 200 {object} response.Response{data=model.AddressBookCollection}
89
 // @Success 200 {object} response.Response{data=model.AddressBookCollection}
90
 // @Failure 500 {object} response.Response
90
 // @Failure 500 {object} response.Response
91
 // @Router /admin/address_book_collection_rule/create [post]
91
 // @Router /admin/address_book_collection_rule/create [post]
@@ -169,12 +169,12 @@ func (abcr *AddressBookCollectionRule) CheckForm(u *model.User, t *model.Address
169
 }
169
 }
170
 
170
 
171
 // Update 编辑
171
 // Update 编辑
172
-// @AddressBookCollectionRule 地址簿集合规则
173
-// @Summary 地址簿集合规则编辑
174
-// @Description 地址簿集合规则编辑
172
+// @Tags 地址簿规则
173
+// @Summary 地址簿规则编辑
174
+// @Description 地址簿规则编辑
175
 // @Accept  json
175
 // @Accept  json
176
 // @Produce  json
176
 // @Produce  json
177
-// @Param body body model.AddressBookCollectionRule true "地址簿集合规则信息"
177
+// @Param body body model.AddressBookCollectionRule true "地址簿规则信息"
178
 // @Success 200 {object} response.Response{data=model.AddressBookCollection}
178
 // @Success 200 {object} response.Response{data=model.AddressBookCollection}
179
 // @Failure 500 {object} response.Response
179
 // @Failure 500 {object} response.Response
180
 // @Router /admin/address_book_collection_rule/update [post]
180
 // @Router /admin/address_book_collection_rule/update [post]
@@ -210,12 +210,12 @@ func (abcr *AddressBookCollectionRule) Update(c *gin.Context) {
210
 }
210
 }
211
 
211
 
212
 // Delete 删除
212
 // Delete 删除
213
-// @AddressBookCollectionRule 地址簿集合规则
214
-// @Summary 地址簿集合规则删除
215
-// @Description 地址簿集合规则删除
213
+// @Tags 地址簿规则
214
+// @Summary 地址簿规则删除
215
+// @Description 地址簿规则删除
216
 // @Accept  json
216
 // @Accept  json
217
 // @Produce  json
217
 // @Produce  json
218
-// @Param body body model.AddressBookCollectionRule true "地址簿集合规则信息"
218
+// @Param body body model.AddressBookCollectionRule true "地址簿规则信息"
219
 // @Success 200 {object} response.Response
219
 // @Success 200 {object} response.Response
220
 // @Failure 500 {object} response.Response
220
 // @Failure 500 {object} response.Response
221
 // @Router /admin/address_book_collection_rule/delete [post]
221
 // @Router /admin/address_book_collection_rule/delete [post]

+ 1 - 1
http/controller/admin/peer.go

@@ -192,7 +192,7 @@ func (ct *Peer) Delete(c *gin.Context) {
192
 // @Param body body admin.PeerBatchDeleteForm true "设备id"
192
 // @Param body body admin.PeerBatchDeleteForm true "设备id"
193
 // @Success 200 {object} response.Response
193
 // @Success 200 {object} response.Response
194
 // @Failure 500 {object} response.Response
194
 // @Failure 500 {object} response.Response
195
-// @Router /admin/peer/delete [post]
195
+// @Router /admin/peer/batchDelete [post]
196
 // @Security token
196
 // @Security token
197
 func (ct *Peer) BatchDelete(c *gin.Context) {
197
 func (ct *Peer) BatchDelete(c *gin.Context) {
198
 	f := &admin.PeerBatchDeleteForm{}
198
 	f := &admin.PeerBatchDeleteForm{}

+ 3 - 4
http/router/admin.go

@@ -108,6 +108,8 @@ func AddressBookBind(rg *gin.RouterGroup) {
108
 }
108
 }
109
 func PeerBind(rg *gin.RouterGroup) {
109
 func PeerBind(rg *gin.RouterGroup) {
110
 	aR := rg.Group("/peer")
110
 	aR := rg.Group("/peer")
111
+	aR.POST("/simpleData", (&admin.Peer{}).SimpleData)
112
+	aR.Use(middleware.AdminPrivilege())
111
 	{
113
 	{
112
 		cont := &admin.Peer{}
114
 		cont := &admin.Peer{}
113
 		aR.GET("/list", cont.List)
115
 		aR.GET("/list", cont.List)
@@ -115,10 +117,7 @@ func PeerBind(rg *gin.RouterGroup) {
115
 		aR.POST("/create", cont.Create)
117
 		aR.POST("/create", cont.Create)
116
 		aR.POST("/update", cont.Update)
118
 		aR.POST("/update", cont.Update)
117
 		aR.POST("/delete", cont.Delete)
119
 		aR.POST("/delete", cont.Delete)
118
-		aR.POST("/simpleData", cont.SimpleData)
119
-
120
-		arp := aR.Use(middleware.AdminPrivilege())
121
-		arp.POST("/batchDelete", cont.BatchDelete)
120
+		aR.POST("/batchDelete", cont.BatchDelete)
122
 	}
121
 	}
123
 }
122
 }
124
 
123