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

+ 105 - 30
docs/admin/admin_docs.go

@@ -353,17 +353,20 @@ const docTemplateadmin = `{
353 353
                         "token": []
354 354
                     }
355 355
                 ],
356
-                "description": "创建地址簿集合",
356
+                "description": "创建地址簿名称",
357 357
                 "consumes": [
358 358
                     "application/json"
359 359
                 ],
360 360
                 "produces": [
361 361
                     "application/json"
362 362
                 ],
363
-                "summary": "创建地址簿集合",
363
+                "tags": [
364
+                    "地址簿名称"
365
+                ],
366
+                "summary": "创建地址簿名称",
364 367
                 "parameters": [
365 368
                     {
366
-                        "description": "地址簿集合信息",
369
+                        "description": "地址簿名称信息",
367 370
                         "name": "body",
368 371
                         "in": "body",
369 372
                         "required": true,
@@ -407,17 +410,20 @@ const docTemplateadmin = `{
407 410
                         "token": []
408 411
                     }
409 412
                 ],
410
-                "description": "地址簿集合删除",
413
+                "description": "地址簿名称删除",
411 414
                 "consumes": [
412 415
                     "application/json"
413 416
                 ],
414 417
                 "produces": [
415 418
                     "application/json"
416 419
                 ],
417
-                "summary": "地址簿集合删除",
420
+                "tags": [
421
+                    "地址簿名称"
422
+                ],
423
+                "summary": "地址簿名称删除",
418 424
                 "parameters": [
419 425
                     {
420
-                        "description": "地址簿集合信息",
426
+                        "description": "地址簿名称信息",
421 427
                         "name": "body",
422 428
                         "in": "body",
423 429
                         "required": true,
@@ -449,14 +455,17 @@ const docTemplateadmin = `{
449 455
                         "token": []
450 456
                     }
451 457
                 ],
452
-                "description": "地址簿集合详情",
458
+                "description": "地址簿名称详情",
453 459
                 "consumes": [
454 460
                     "application/json"
455 461
                 ],
456 462
                 "produces": [
457 463
                     "application/json"
458 464
                 ],
459
-                "summary": "地址簿集合详情",
465
+                "tags": [
466
+                    "地址簿名称"
467
+                ],
468
+                "summary": "地址簿名称详情",
460 469
                 "parameters": [
461 470
                     {
462 471
                         "type": "integer",
@@ -501,14 +510,17 @@ const docTemplateadmin = `{
501 510
                         "token": []
502 511
                     }
503 512
                 ],
504
-                "description": "地址簿集合列表",
513
+                "description": "地址簿名称列表",
505 514
                 "consumes": [
506 515
                     "application/json"
507 516
                 ],
508 517
                 "produces": [
509 518
                     "application/json"
510 519
                 ],
511
-                "summary": "地址簿集合列表",
520
+                "tags": [
521
+                    "地址簿名称"
522
+                ],
523
+                "summary": "地址簿名称列表",
512 524
                 "parameters": [
513 525
                     {
514 526
                         "type": "integer",
@@ -570,17 +582,20 @@ const docTemplateadmin = `{
570 582
                         "token": []
571 583
                     }
572 584
                 ],
573
-                "description": "地址簿集合编辑",
585
+                "description": "地址簿名称编辑",
574 586
                 "consumes": [
575 587
                     "application/json"
576 588
                 ],
577 589
                 "produces": [
578 590
                     "application/json"
579 591
                 ],
580
-                "summary": "地址簿集合编辑",
592
+                "tags": [
593
+                    "地址簿名称"
594
+                ],
595
+                "summary": "地址簿名称编辑",
581 596
                 "parameters": [
582 597
                     {
583
-                        "description": "地址簿集合信息",
598
+                        "description": "地址簿名称信息",
584 599
                         "name": "body",
585 600
                         "in": "body",
586 601
                         "required": true,
@@ -624,17 +639,20 @@ const docTemplateadmin = `{
624 639
                         "token": []
625 640
                     }
626 641
                 ],
627
-                "description": "创建地址簿集合规则",
642
+                "description": "创建地址簿规则",
628 643
                 "consumes": [
629 644
                     "application/json"
630 645
                 ],
631 646
                 "produces": [
632 647
                     "application/json"
633 648
                 ],
634
-                "summary": "创建地址簿集合规则",
649
+                "tags": [
650
+                    "地址簿规则"
651
+                ],
652
+                "summary": "创建地址簿规则",
635 653
                 "parameters": [
636 654
                     {
637
-                        "description": "地址簿集合规则信息",
655
+                        "description": "地址簿规则信息",
638 656
                         "name": "body",
639 657
                         "in": "body",
640 658
                         "required": true,
@@ -678,17 +696,20 @@ const docTemplateadmin = `{
678 696
                         "token": []
679 697
                     }
680 698
                 ],
681
-                "description": "地址簿集合规则删除",
699
+                "description": "地址簿规则删除",
682 700
                 "consumes": [
683 701
                     "application/json"
684 702
                 ],
685 703
                 "produces": [
686 704
                     "application/json"
687 705
                 ],
688
-                "summary": "地址簿集合规则删除",
706
+                "tags": [
707
+                    "地址簿规则"
708
+                ],
709
+                "summary": "地址簿规则删除",
689 710
                 "parameters": [
690 711
                     {
691
-                        "description": "地址簿集合规则信息",
712
+                        "description": "地址簿规则信息",
692 713
                         "name": "body",
693 714
                         "in": "body",
694 715
                         "required": true,
@@ -720,14 +741,17 @@ const docTemplateadmin = `{
720 741
                         "token": []
721 742
                     }
722 743
                 ],
723
-                "description": "地址簿集合规则详情",
744
+                "description": "地址簿规则详情",
724 745
                 "consumes": [
725 746
                     "application/json"
726 747
                 ],
727 748
                 "produces": [
728 749
                     "application/json"
729 750
                 ],
730
-                "summary": "地址簿集合规则详情",
751
+                "tags": [
752
+                    "地址簿规则"
753
+                ],
754
+                "summary": "地址簿规则详情",
731 755
                 "parameters": [
732 756
                     {
733 757
                         "type": "integer",
@@ -772,14 +796,17 @@ const docTemplateadmin = `{
772 796
                         "token": []
773 797
                     }
774 798
                 ],
775
-                "description": "地址簿集合规则列表",
799
+                "description": "地址簿规则列表",
776 800
                 "consumes": [
777 801
                     "application/json"
778 802
                 ],
779 803
                 "produces": [
780 804
                     "application/json"
781 805
                 ],
782
-                "summary": "地址簿集合规则列表",
806
+                "tags": [
807
+                    "地址簿规则"
808
+                ],
809
+                "summary": "地址簿规则列表",
783 810
                 "parameters": [
784 811
                     {
785 812
                         "type": "integer",
@@ -847,17 +874,20 @@ const docTemplateadmin = `{
847 874
                         "token": []
848 875
                     }
849 876
                 ],
850
-                "description": "地址簿集合规则编辑",
877
+                "description": "地址簿规则编辑",
851 878
                 "consumes": [
852 879
                     "application/json"
853 880
                 ],
854 881
                 "produces": [
855 882
                     "application/json"
856 883
                 ],
857
-                "summary": "地址簿集合规则编辑",
884
+                "tags": [
885
+                    "地址簿规则"
886
+                ],
887
+                "summary": "地址簿规则编辑",
858 888
                 "parameters": [
859 889
                     {
860
-                        "description": "地址簿集合规则信息",
890
+                        "description": "地址簿规则信息",
861 891
                         "name": "body",
862 892
                         "in": "body",
863 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 2089
         "/admin/peer/create": {
2015 2090
             "post": {
2016 2091
                 "security": [
@@ -2075,7 +2150,7 @@ const docTemplateadmin = `{
2075 2150
                         "token": []
2076 2151
                     }
2077 2152
                 ],
2078
-                "description": "批量设备删除",
2153
+                "description": "设备删除",
2079 2154
                 "consumes": [
2080 2155
                     "application/json"
2081 2156
                 ],
@@ -2085,15 +2160,15 @@ const docTemplateadmin = `{
2085 2160
                 "tags": [
2086 2161
                     "设备"
2087 2162
                 ],
2088
-                "summary": "批量设备删除",
2163
+                "summary": "设备删除",
2089 2164
                 "parameters": [
2090 2165
                     {
2091
-                        "description": "设备id",
2166
+                        "description": "设备信息",
2092 2167
                         "name": "body",
2093 2168
                         "in": "body",
2094 2169
                         "required": true,
2095 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 346
                         "token": []
347 347
                     }
348 348
                 ],
349
-                "description": "创建地址簿集合",
349
+                "description": "创建地址簿名称",
350 350
                 "consumes": [
351 351
                     "application/json"
352 352
                 ],
353 353
                 "produces": [
354 354
                     "application/json"
355 355
                 ],
356
-                "summary": "创建地址簿集合",
356
+                "tags": [
357
+                    "地址簿名称"
358
+                ],
359
+                "summary": "创建地址簿名称",
357 360
                 "parameters": [
358 361
                     {
359
-                        "description": "地址簿集合信息",
362
+                        "description": "地址簿名称信息",
360 363
                         "name": "body",
361 364
                         "in": "body",
362 365
                         "required": true,
@@ -400,17 +403,20 @@
400 403
                         "token": []
401 404
                     }
402 405
                 ],
403
-                "description": "地址簿集合删除",
406
+                "description": "地址簿名称删除",
404 407
                 "consumes": [
405 408
                     "application/json"
406 409
                 ],
407 410
                 "produces": [
408 411
                     "application/json"
409 412
                 ],
410
-                "summary": "地址簿集合删除",
413
+                "tags": [
414
+                    "地址簿名称"
415
+                ],
416
+                "summary": "地址簿名称删除",
411 417
                 "parameters": [
412 418
                     {
413
-                        "description": "地址簿集合信息",
419
+                        "description": "地址簿名称信息",
414 420
                         "name": "body",
415 421
                         "in": "body",
416 422
                         "required": true,
@@ -442,14 +448,17 @@
442 448
                         "token": []
443 449
                     }
444 450
                 ],
445
-                "description": "地址簿集合详情",
451
+                "description": "地址簿名称详情",
446 452
                 "consumes": [
447 453
                     "application/json"
448 454
                 ],
449 455
                 "produces": [
450 456
                     "application/json"
451 457
                 ],
452
-                "summary": "地址簿集合详情",
458
+                "tags": [
459
+                    "地址簿名称"
460
+                ],
461
+                "summary": "地址簿名称详情",
453 462
                 "parameters": [
454 463
                     {
455 464
                         "type": "integer",
@@ -494,14 +503,17 @@
494 503
                         "token": []
495 504
                     }
496 505
                 ],
497
-                "description": "地址簿集合列表",
506
+                "description": "地址簿名称列表",
498 507
                 "consumes": [
499 508
                     "application/json"
500 509
                 ],
501 510
                 "produces": [
502 511
                     "application/json"
503 512
                 ],
504
-                "summary": "地址簿集合列表",
513
+                "tags": [
514
+                    "地址簿名称"
515
+                ],
516
+                "summary": "地址簿名称列表",
505 517
                 "parameters": [
506 518
                     {
507 519
                         "type": "integer",
@@ -563,17 +575,20 @@
563 575
                         "token": []
564 576
                     }
565 577
                 ],
566
-                "description": "地址簿集合编辑",
578
+                "description": "地址簿名称编辑",
567 579
                 "consumes": [
568 580
                     "application/json"
569 581
                 ],
570 582
                 "produces": [
571 583
                     "application/json"
572 584
                 ],
573
-                "summary": "地址簿集合编辑",
585
+                "tags": [
586
+                    "地址簿名称"
587
+                ],
588
+                "summary": "地址簿名称编辑",
574 589
                 "parameters": [
575 590
                     {
576
-                        "description": "地址簿集合信息",
591
+                        "description": "地址簿名称信息",
577 592
                         "name": "body",
578 593
                         "in": "body",
579 594
                         "required": true,
@@ -617,17 +632,20 @@
617 632
                         "token": []
618 633
                     }
619 634
                 ],
620
-                "description": "创建地址簿集合规则",
635
+                "description": "创建地址簿规则",
621 636
                 "consumes": [
622 637
                     "application/json"
623 638
                 ],
624 639
                 "produces": [
625 640
                     "application/json"
626 641
                 ],
627
-                "summary": "创建地址簿集合规则",
642
+                "tags": [
643
+                    "地址簿规则"
644
+                ],
645
+                "summary": "创建地址簿规则",
628 646
                 "parameters": [
629 647
                     {
630
-                        "description": "地址簿集合规则信息",
648
+                        "description": "地址簿规则信息",
631 649
                         "name": "body",
632 650
                         "in": "body",
633 651
                         "required": true,
@@ -671,17 +689,20 @@
671 689
                         "token": []
672 690
                     }
673 691
                 ],
674
-                "description": "地址簿集合规则删除",
692
+                "description": "地址簿规则删除",
675 693
                 "consumes": [
676 694
                     "application/json"
677 695
                 ],
678 696
                 "produces": [
679 697
                     "application/json"
680 698
                 ],
681
-                "summary": "地址簿集合规则删除",
699
+                "tags": [
700
+                    "地址簿规则"
701
+                ],
702
+                "summary": "地址簿规则删除",
682 703
                 "parameters": [
683 704
                     {
684
-                        "description": "地址簿集合规则信息",
705
+                        "description": "地址簿规则信息",
685 706
                         "name": "body",
686 707
                         "in": "body",
687 708
                         "required": true,
@@ -713,14 +734,17 @@
713 734
                         "token": []
714 735
                     }
715 736
                 ],
716
-                "description": "地址簿集合规则详情",
737
+                "description": "地址簿规则详情",
717 738
                 "consumes": [
718 739
                     "application/json"
719 740
                 ],
720 741
                 "produces": [
721 742
                     "application/json"
722 743
                 ],
723
-                "summary": "地址簿集合规则详情",
744
+                "tags": [
745
+                    "地址簿规则"
746
+                ],
747
+                "summary": "地址簿规则详情",
724 748
                 "parameters": [
725 749
                     {
726 750
                         "type": "integer",
@@ -765,14 +789,17 @@
765 789
                         "token": []
766 790
                     }
767 791
                 ],
768
-                "description": "地址簿集合规则列表",
792
+                "description": "地址簿规则列表",
769 793
                 "consumes": [
770 794
                     "application/json"
771 795
                 ],
772 796
                 "produces": [
773 797
                     "application/json"
774 798
                 ],
775
-                "summary": "地址簿集合规则列表",
799
+                "tags": [
800
+                    "地址簿规则"
801
+                ],
802
+                "summary": "地址簿规则列表",
776 803
                 "parameters": [
777 804
                     {
778 805
                         "type": "integer",
@@ -840,17 +867,20 @@
840 867
                         "token": []
841 868
                     }
842 869
                 ],
843
-                "description": "地址簿集合规则编辑",
870
+                "description": "地址簿规则编辑",
844 871
                 "consumes": [
845 872
                     "application/json"
846 873
                 ],
847 874
                 "produces": [
848 875
                     "application/json"
849 876
                 ],
850
-                "summary": "地址簿集合规则编辑",
877
+                "tags": [
878
+                    "地址簿规则"
879
+                ],
880
+                "summary": "地址簿规则编辑",
851 881
                 "parameters": [
852 882
                     {
853
-                        "description": "地址簿集合规则信息",
883
+                        "description": "地址簿规则信息",
854 884
                         "name": "body",
855 885
                         "in": "body",
856 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 2082
         "/admin/peer/create": {
2008 2083
             "post": {
2009 2084
                 "security": [
@@ -2068,7 +2143,7 @@
2068 2143
                         "token": []
2069 2144
                     }
2070 2145
                 ],
2071
-                "description": "批量设备删除",
2146
+                "description": "设备删除",
2072 2147
                 "consumes": [
2073 2148
                     "application/json"
2074 2149
                 ],
@@ -2078,15 +2153,15 @@
2078 2153
                 "tags": [
2079 2154
                     "设备"
2080 2155
                 ],
2081
-                "summary": "批量设备删除",
2156
+                "summary": "设备删除",
2082 2157
                 "parameters": [
2083 2158
                     {
2084
-                        "description": "设备id",
2159
+                        "description": "设备信息",
2085 2160
                         "name": "body",
2086 2161
                         "in": "body",
2087 2162
                         "required": true,
2088 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 903
     post:
904 904
       consumes:
905 905
       - application/json
906
-      description: 创建地址簿集合
906
+      description: 创建地址簿名称
907 907
       parameters:
908
-      - description: 地址簿集合信息
908
+      - description: 地址簿名称信息
909 909
         in: body
910 910
         name: body
911 911
         required: true
@@ -929,14 +929,16 @@ paths:
929 929
             $ref: '#/definitions/response.Response'
930 930
       security:
931 931
       - token: []
932
-      summary: 创建地址簿集合
932
+      summary: 创建地址簿名称
933
+      tags:
934
+      - 地址簿名称
933 935
   /admin/address_book_collection/delete:
934 936
     post:
935 937
       consumes:
936 938
       - application/json
937
-      description: 地址簿集合删除
939
+      description: 地址簿名称删除
938 940
       parameters:
939
-      - description: 地址簿集合信息
941
+      - description: 地址簿名称信息
940 942
         in: body
941 943
         name: body
942 944
         required: true
@@ -955,12 +957,14 @@ paths:
955 957
             $ref: '#/definitions/response.Response'
956 958
       security:
957 959
       - token: []
958
-      summary: 地址簿集合删除
960
+      summary: 地址簿名称删除
961
+      tags:
962
+      - 地址簿名称
959 963
   /admin/address_book_collection/detail/{id}:
960 964
     get:
961 965
       consumes:
962 966
       - application/json
963
-      description: 地址簿集合详情
967
+      description: 地址簿名称详情
964 968
       parameters:
965 969
       - description: ID
966 970
         in: path
@@ -985,12 +989,14 @@ paths:
985 989
             $ref: '#/definitions/response.Response'
986 990
       security:
987 991
       - token: []
988
-      summary: 地址簿集合详情
992
+      summary: 地址簿名称详情
993
+      tags:
994
+      - 地址簿名称
989 995
   /admin/address_book_collection/list:
990 996
     get:
991 997
       consumes:
992 998
       - application/json
993
-      description: 地址簿集合列表
999
+      description: 地址簿名称列表
994 1000
       parameters:
995 1001
       - description: 页码
996 1002
         in: query
@@ -1026,14 +1032,16 @@ paths:
1026 1032
             $ref: '#/definitions/response.Response'
1027 1033
       security:
1028 1034
       - token: []
1029
-      summary: 地址簿集合列表
1035
+      summary: 地址簿名称列表
1036
+      tags:
1037
+      - 地址簿名称
1030 1038
   /admin/address_book_collection/update:
1031 1039
     post:
1032 1040
       consumes:
1033 1041
       - application/json
1034
-      description: 地址簿集合编辑
1042
+      description: 地址簿名称编辑
1035 1043
       parameters:
1036
-      - description: 地址簿集合信息
1044
+      - description: 地址簿名称信息
1037 1045
         in: body
1038 1046
         name: body
1039 1047
         required: true
@@ -1057,14 +1065,16 @@ paths:
1057 1065
             $ref: '#/definitions/response.Response'
1058 1066
       security:
1059 1067
       - token: []
1060
-      summary: 地址簿集合编辑
1068
+      summary: 地址簿名称编辑
1069
+      tags:
1070
+      - 地址簿名称
1061 1071
   /admin/address_book_collection_rule/create:
1062 1072
     post:
1063 1073
       consumes:
1064 1074
       - application/json
1065
-      description: 创建地址簿集合规则
1075
+      description: 创建地址簿规则
1066 1076
       parameters:
1067
-      - description: 地址簿集合规则信息
1077
+      - description: 地址簿规则信息
1068 1078
         in: body
1069 1079
         name: body
1070 1080
         required: true
@@ -1088,14 +1098,16 @@ paths:
1088 1098
             $ref: '#/definitions/response.Response'
1089 1099
       security:
1090 1100
       - token: []
1091
-      summary: 创建地址簿集合规则
1101
+      summary: 创建地址簿规则
1102
+      tags:
1103
+      - 地址簿规则
1092 1104
   /admin/address_book_collection_rule/delete:
1093 1105
     post:
1094 1106
       consumes:
1095 1107
       - application/json
1096
-      description: 地址簿集合规则删除
1108
+      description: 地址簿规则删除
1097 1109
       parameters:
1098
-      - description: 地址簿集合规则信息
1110
+      - description: 地址簿规则信息
1099 1111
         in: body
1100 1112
         name: body
1101 1113
         required: true
@@ -1114,12 +1126,14 @@ paths:
1114 1126
             $ref: '#/definitions/response.Response'
1115 1127
       security:
1116 1128
       - token: []
1117
-      summary: 地址簿集合规则删除
1129
+      summary: 地址簿规则删除
1130
+      tags:
1131
+      - 地址簿规则
1118 1132
   /admin/address_book_collection_rule/detail/{id}:
1119 1133
     get:
1120 1134
       consumes:
1121 1135
       - application/json
1122
-      description: 地址簿集合规则详情
1136
+      description: 地址簿规则详情
1123 1137
       parameters:
1124 1138
       - description: ID
1125 1139
         in: path
@@ -1144,12 +1158,14 @@ paths:
1144 1158
             $ref: '#/definitions/response.Response'
1145 1159
       security:
1146 1160
       - token: []
1147
-      summary: 地址簿集合规则详情
1161
+      summary: 地址簿规则详情
1162
+      tags:
1163
+      - 地址簿规则
1148 1164
   /admin/address_book_collection_rule/list:
1149 1165
     get:
1150 1166
       consumes:
1151 1167
       - application/json
1152
-      description: 地址簿集合规则列表
1168
+      description: 地址簿规则列表
1153 1169
       parameters:
1154 1170
       - description: 页码
1155 1171
         in: query
@@ -1189,14 +1205,16 @@ paths:
1189 1205
             $ref: '#/definitions/response.Response'
1190 1206
       security:
1191 1207
       - token: []
1192
-      summary: 地址簿集合规则列表
1208
+      summary: 地址簿规则列表
1209
+      tags:
1210
+      - 地址簿规则
1193 1211
   /admin/address_book_collection_rule/update:
1194 1212
     post:
1195 1213
       consumes:
1196 1214
       - application/json
1197
-      description: 地址簿集合规则编辑
1215
+      description: 地址簿规则编辑
1198 1216
       parameters:
1199
-      - description: 地址簿集合规则信息
1217
+      - description: 地址簿规则信息
1200 1218
         in: body
1201 1219
         name: body
1202 1220
         required: true
@@ -1220,7 +1238,9 @@ paths:
1220 1238
             $ref: '#/definitions/response.Response'
1221 1239
       security:
1222 1240
       - token: []
1223
-      summary: 地址簿集合规则编辑
1241
+      summary: 地址簿规则编辑
1242
+      tags:
1243
+      - 地址簿规则
1224 1244
   /admin/app-config:
1225 1245
     get:
1226 1246
       consumes:
@@ -1890,6 +1910,34 @@ paths:
1890 1910
       summary: OidcAuthQuery
1891 1911
       tags:
1892 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 1941
   /admin/peer/create:
1894 1942
     post:
1895 1943
       consumes:
@@ -1927,14 +1975,14 @@ paths:
1927 1975
     post:
1928 1976
       consumes:
1929 1977
       - application/json
1930
-      description: 批量设备删除
1978
+      description: 设备删除
1931 1979
       parameters:
1932
-      - description: 设备id
1980
+      - description: 设备信息
1933 1981
         in: body
1934 1982
         name: body
1935 1983
         required: true
1936 1984
         schema:
1937
-          $ref: '#/definitions/admin.PeerBatchDeleteForm'
1985
+          $ref: '#/definitions/admin.PeerForm'
1938 1986
       produces:
1939 1987
       - application/json
1940 1988
       responses:
@@ -1948,7 +1996,7 @@ paths:
1948 1996
             $ref: '#/definitions/response.Response'
1949 1997
       security:
1950 1998
       - token: []
1951
-      summary: 批量设备删除
1999
+      summary: 设备删除
1952 2000
       tags:
1953 2001
       - 设备
1954 2002
   /admin/peer/detail/{id}:

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

@@ -14,10 +14,10 @@ import (
14 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 21
 // @Accept  json
22 22
 // @Produce  json
23 23
 // @Param id path int true "ID"
@@ -42,13 +42,13 @@ func (abc *AddressBookCollection) Detail(c *gin.Context) {
42 42
 	return
43 43
 }
44 44
 
45
-// Create 创建地址簿集合
46
-// @AddressBookCollections 地址簿集合
47
-// @Summary 创建地址簿集合
48
-// @Description 创建地址簿集合
45
+// Create 创建地址簿名称
46
+// @Tags 地址簿名称
47
+// @Summary 创建地址簿名称
48
+// @Description 创建地址簿名称
49 49
 // @Accept  json
50 50
 // @Produce  json
51
-// @Param body body model.AddressBookCollection true "地址簿集合信息"
51
+// @Param body body model.AddressBookCollection true "地址簿名称信息"
52 52
 // @Success 200 {object} response.Response{data=model.AddressBookCollection}
53 53
 // @Failure 500 {object} response.Response
54 54
 // @Router /admin/address_book_collection/create [post]
@@ -79,9 +79,9 @@ func (abc *AddressBookCollection) Create(c *gin.Context) {
79 79
 }
80 80
 
81 81
 // List 列表
82
-// @AddressBookCollections 地址簿集合
83
-// @Summary 地址簿集合列表
84
-// @Description 地址簿集合列表
82
+// @Tags 地址簿名称
83
+// @Summary 地址簿名称列表
84
+// @Description 地址簿名称列表
85 85
 // @Accept  json
86 86
 // @Produce  json
87 87
 // @Param page query int false "页码"
@@ -111,12 +111,12 @@ func (abc *AddressBookCollection) List(c *gin.Context) {
111 111
 }
112 112
 
113 113
 // Update 编辑
114
-// @AddressBookCollections 地址簿集合
115
-// @Summary 地址簿集合编辑
116
-// @Description 地址簿集合编辑
114
+// @Tags 地址簿名称
115
+// @Summary 地址簿名称编辑
116
+// @Description 地址簿名称编辑
117 117
 // @Accept  json
118 118
 // @Produce  json
119
-// @Param body body model.AddressBookCollection true "地址簿集合信息"
119
+// @Param body body model.AddressBookCollection true "地址簿名称信息"
120 120
 // @Success 200 {object} response.Response{data=model.AddressBookCollection}
121 121
 // @Failure 500 {object} response.Response
122 122
 // @Router /admin/address_book_collection/update [post]
@@ -151,12 +151,12 @@ func (abc *AddressBookCollection) Update(c *gin.Context) {
151 151
 }
152 152
 
153 153
 // Delete 删除
154
-// @AddressBookCollections 地址簿集合
155
-// @Summary 地址簿集合删除
156
-// @Description 地址簿集合删除
154
+// @Tags 地址簿名称
155
+// @Summary 地址簿名称删除
156
+// @Description 地址簿名称删除
157 157
 // @Accept  json
158 158
 // @Produce  json
159
-// @Param body body model.AddressBookCollection true "地址簿集合信息"
159
+// @Param body body model.AddressBookCollection true "地址簿名称信息"
160 160
 // @Success 200 {object} response.Response
161 161
 // @Failure 500 {object} response.Response
162 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 17
 // List 列表
18
-// @AddressBookCollectionRule 地址簿集合规则
19
-// @Summary 地址簿集合规则列表
20
-// @Description 地址簿集合规则列表
18
+// @Tags 地址簿规则
19
+// @Summary 地址簿规则列表
20
+// @Description 地址簿规则列表
21 21
 // @Accept  json
22 22
 // @Produce  json
23 23
 // @Param page query int false "页码"
@@ -51,10 +51,10 @@ func (abcr *AddressBookCollectionRule) List(c *gin.Context) {
51 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 58
 // @Accept  json
59 59
 // @Produce  json
60 60
 // @Param id path int true "ID"
@@ -79,13 +79,13 @@ func (abcr *AddressBookCollectionRule) Detail(c *gin.Context) {
79 79
 	return
80 80
 }
81 81
 
82
-// Create 创建地址簿集合规则
83
-// @AddressBookCollectionRule 地址簿集合规则
84
-// @Summary 创建地址簿集合规则
85
-// @Description 创建地址簿集合规则
82
+// Create 创建地址簿规则
83
+// @Tags 地址簿规则
84
+// @Summary 创建地址簿规则
85
+// @Description 创建地址簿规则
86 86
 // @Accept  json
87 87
 // @Produce  json
88
-// @Param body body model.AddressBookCollectionRule true "地址簿集合规则信息"
88
+// @Param body body model.AddressBookCollectionRule true "地址簿规则信息"
89 89
 // @Success 200 {object} response.Response{data=model.AddressBookCollection}
90 90
 // @Failure 500 {object} response.Response
91 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 171
 // Update 编辑
172
-// @AddressBookCollectionRule 地址簿集合规则
173
-// @Summary 地址簿集合规则编辑
174
-// @Description 地址簿集合规则编辑
172
+// @Tags 地址簿规则
173
+// @Summary 地址簿规则编辑
174
+// @Description 地址簿规则编辑
175 175
 // @Accept  json
176 176
 // @Produce  json
177
-// @Param body body model.AddressBookCollectionRule true "地址簿集合规则信息"
177
+// @Param body body model.AddressBookCollectionRule true "地址簿规则信息"
178 178
 // @Success 200 {object} response.Response{data=model.AddressBookCollection}
179 179
 // @Failure 500 {object} response.Response
180 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 212
 // Delete 删除
213
-// @AddressBookCollectionRule 地址簿集合规则
214
-// @Summary 地址簿集合规则删除
215
-// @Description 地址簿集合规则删除
213
+// @Tags 地址簿规则
214
+// @Summary 地址簿规则删除
215
+// @Description 地址簿规则删除
216 216
 // @Accept  json
217 217
 // @Produce  json
218
-// @Param body body model.AddressBookCollectionRule true "地址簿集合规则信息"
218
+// @Param body body model.AddressBookCollectionRule true "地址簿规则信息"
219 219
 // @Success 200 {object} response.Response
220 220
 // @Failure 500 {object} response.Response
221 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 192
 // @Param body body admin.PeerBatchDeleteForm true "设备id"
193 193
 // @Success 200 {object} response.Response
194 194
 // @Failure 500 {object} response.Response
195
-// @Router /admin/peer/delete [post]
195
+// @Router /admin/peer/batchDelete [post]
196 196
 // @Security token
197 197
 func (ct *Peer) BatchDelete(c *gin.Context) {
198 198
 	f := &admin.PeerBatchDeleteForm{}

+ 3 - 4
http/router/admin.go

@@ -108,6 +108,8 @@ func AddressBookBind(rg *gin.RouterGroup) {
108 108
 }
109 109
 func PeerBind(rg *gin.RouterGroup) {
110 110
 	aR := rg.Group("/peer")
111
+	aR.POST("/simpleData", (&admin.Peer{}).SimpleData)
112
+	aR.Use(middleware.AdminPrivilege())
111 113
 	{
112 114
 		cont := &admin.Peer{}
113 115
 		aR.GET("/list", cont.List)
@@ -115,10 +117,7 @@ func PeerBind(rg *gin.RouterGroup) {
115 117
 		aR.POST("/create", cont.Create)
116 118
 		aR.POST("/update", cont.Update)
117 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