This commit is contained in:
ljw
2024-11-02 18:49:16 +08:00
parent c5e3482538
commit 4909beee32
7 changed files with 332 additions and 135 deletions

View File

@@ -353,17 +353,20 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "创建地址簿集合", "description": "创建地址簿名称",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "创建地址簿集合", "tags": [
"地址簿名称"
],
"summary": "创建地址簿名称",
"parameters": [ "parameters": [
{ {
"description": "地址簿集合信息", "description": "地址簿名称信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
@@ -407,17 +410,20 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "地址簿集合删除", "description": "地址簿名称删除",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合删除", "tags": [
"地址簿名称"
],
"summary": "地址簿名称删除",
"parameters": [ "parameters": [
{ {
"description": "地址簿集合信息", "description": "地址簿名称信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
@@ -449,14 +455,17 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "地址簿集合详情", "description": "地址簿名称详情",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合详情", "tags": [
"地址簿名称"
],
"summary": "地址簿名称详情",
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
@@ -501,14 +510,17 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "地址簿集合列表", "description": "地址簿名称列表",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合列表", "tags": [
"地址簿名称"
],
"summary": "地址簿名称列表",
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
@@ -570,17 +582,20 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "地址簿集合编辑", "description": "地址簿名称编辑",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合编辑", "tags": [
"地址簿名称"
],
"summary": "地址簿名称编辑",
"parameters": [ "parameters": [
{ {
"description": "地址簿集合信息", "description": "地址簿名称信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
@@ -624,17 +639,20 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "创建地址簿集合规则", "description": "创建地址簿规则",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "创建地址簿集合规则", "tags": [
"地址簿规则"
],
"summary": "创建地址簿规则",
"parameters": [ "parameters": [
{ {
"description": "地址簿集合规则信息", "description": "地址簿规则信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
@@ -678,17 +696,20 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "地址簿集合规则删除", "description": "地址簿规则删除",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合规则删除", "tags": [
"地址簿规则"
],
"summary": "地址簿规则删除",
"parameters": [ "parameters": [
{ {
"description": "地址簿集合规则信息", "description": "地址簿规则信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
@@ -720,14 +741,17 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "地址簿集合规则详情", "description": "地址簿规则详情",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合规则详情", "tags": [
"地址簿规则"
],
"summary": "地址簿规则详情",
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
@@ -772,14 +796,17 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "地址簿集合规则列表", "description": "地址簿规则列表",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合规则列表", "tags": [
"地址簿规则"
],
"summary": "地址簿规则列表",
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
@@ -847,17 +874,20 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "地址簿集合规则编辑", "description": "地址簿规则编辑",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合规则编辑", "tags": [
"地址簿规则"
],
"summary": "地址簿规则编辑",
"parameters": [ "parameters": [
{ {
"description": "地址簿集合规则信息", "description": "地址簿规则信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
@@ -2011,6 +2041,51 @@ const docTemplateadmin = `{
} }
} }
}, },
"/admin/peer/batchDelete": {
"post": {
"security": [
{
"token": []
}
],
"description": "批量设备删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"设备"
],
"summary": "批量设备删除",
"parameters": [
{
"description": "设备id",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.PeerBatchDeleteForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/peer/create": { "/admin/peer/create": {
"post": { "post": {
"security": [ "security": [
@@ -2075,7 +2150,7 @@ const docTemplateadmin = `{
"token": [] "token": []
} }
], ],
"description": "批量设备删除", "description": "设备删除",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@@ -2085,15 +2160,15 @@ const docTemplateadmin = `{
"tags": [ "tags": [
"设备" "设备"
], ],
"summary": "批量设备删除", "summary": "设备删除",
"parameters": [ "parameters": [
{ {
"description": "设备id", "description": "设备信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/admin.PeerBatchDeleteForm" "$ref": "#/definitions/admin.PeerForm"
} }
} }
], ],

View File

@@ -346,17 +346,20 @@
"token": [] "token": []
} }
], ],
"description": "创建地址簿集合", "description": "创建地址簿名称",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "创建地址簿集合", "tags": [
"地址簿名称"
],
"summary": "创建地址簿名称",
"parameters": [ "parameters": [
{ {
"description": "地址簿集合信息", "description": "地址簿名称信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
@@ -400,17 +403,20 @@
"token": [] "token": []
} }
], ],
"description": "地址簿集合删除", "description": "地址簿名称删除",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合删除", "tags": [
"地址簿名称"
],
"summary": "地址簿名称删除",
"parameters": [ "parameters": [
{ {
"description": "地址簿集合信息", "description": "地址簿名称信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
@@ -442,14 +448,17 @@
"token": [] "token": []
} }
], ],
"description": "地址簿集合详情", "description": "地址簿名称详情",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合详情", "tags": [
"地址簿名称"
],
"summary": "地址簿名称详情",
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
@@ -494,14 +503,17 @@
"token": [] "token": []
} }
], ],
"description": "地址簿集合列表", "description": "地址簿名称列表",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合列表", "tags": [
"地址簿名称"
],
"summary": "地址簿名称列表",
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
@@ -563,17 +575,20 @@
"token": [] "token": []
} }
], ],
"description": "地址簿集合编辑", "description": "地址簿名称编辑",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合编辑", "tags": [
"地址簿名称"
],
"summary": "地址簿名称编辑",
"parameters": [ "parameters": [
{ {
"description": "地址簿集合信息", "description": "地址簿名称信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
@@ -617,17 +632,20 @@
"token": [] "token": []
} }
], ],
"description": "创建地址簿集合规则", "description": "创建地址簿规则",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "创建地址簿集合规则", "tags": [
"地址簿规则"
],
"summary": "创建地址簿规则",
"parameters": [ "parameters": [
{ {
"description": "地址簿集合规则信息", "description": "地址簿规则信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
@@ -671,17 +689,20 @@
"token": [] "token": []
} }
], ],
"description": "地址簿集合规则删除", "description": "地址簿规则删除",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合规则删除", "tags": [
"地址簿规则"
],
"summary": "地址簿规则删除",
"parameters": [ "parameters": [
{ {
"description": "地址簿集合规则信息", "description": "地址簿规则信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
@@ -713,14 +734,17 @@
"token": [] "token": []
} }
], ],
"description": "地址簿集合规则详情", "description": "地址簿规则详情",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合规则详情", "tags": [
"地址簿规则"
],
"summary": "地址簿规则详情",
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
@@ -765,14 +789,17 @@
"token": [] "token": []
} }
], ],
"description": "地址簿集合规则列表", "description": "地址簿规则列表",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合规则列表", "tags": [
"地址簿规则"
],
"summary": "地址簿规则列表",
"parameters": [ "parameters": [
{ {
"type": "integer", "type": "integer",
@@ -840,17 +867,20 @@
"token": [] "token": []
} }
], ],
"description": "地址簿集合规则编辑", "description": "地址簿规则编辑",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
"produces": [ "produces": [
"application/json" "application/json"
], ],
"summary": "地址簿集合规则编辑", "tags": [
"地址簿规则"
],
"summary": "地址簿规则编辑",
"parameters": [ "parameters": [
{ {
"description": "地址簿集合规则信息", "description": "地址簿规则信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
@@ -2004,6 +2034,51 @@
} }
} }
}, },
"/admin/peer/batchDelete": {
"post": {
"security": [
{
"token": []
}
],
"description": "批量设备删除",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"设备"
],
"summary": "批量设备删除",
"parameters": [
{
"description": "设备id",
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/admin.PeerBatchDeleteForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/response.Response"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/response.Response"
}
}
}
}
},
"/admin/peer/create": { "/admin/peer/create": {
"post": { "post": {
"security": [ "security": [
@@ -2068,7 +2143,7 @@
"token": [] "token": []
} }
], ],
"description": "批量设备删除", "description": "设备删除",
"consumes": [ "consumes": [
"application/json" "application/json"
], ],
@@ -2078,15 +2153,15 @@
"tags": [ "tags": [
"设备" "设备"
], ],
"summary": "批量设备删除", "summary": "设备删除",
"parameters": [ "parameters": [
{ {
"description": "设备id", "description": "设备信息",
"name": "body", "name": "body",
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/admin.PeerBatchDeleteForm" "$ref": "#/definitions/admin.PeerForm"
} }
} }
], ],

View File

@@ -903,9 +903,9 @@ paths:
post: post:
consumes: consumes:
- application/json - application/json
description: 创建地址簿集合 description: 创建地址簿名称
parameters: parameters:
- description: 地址簿集合信息 - description: 地址簿名称信息
in: body in: body
name: body name: body
required: true required: true
@@ -929,14 +929,16 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 创建地址簿集合 summary: 创建地址簿名称
tags:
- 地址簿名称
/admin/address_book_collection/delete: /admin/address_book_collection/delete:
post: post:
consumes: consumes:
- application/json - application/json
description: 地址簿集合删除 description: 地址簿名称删除
parameters: parameters:
- description: 地址簿集合信息 - description: 地址簿名称信息
in: body in: body
name: body name: body
required: true required: true
@@ -955,12 +957,14 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 地址簿集合删除 summary: 地址簿名称删除
tags:
- 地址簿名称
/admin/address_book_collection/detail/{id}: /admin/address_book_collection/detail/{id}:
get: get:
consumes: consumes:
- application/json - application/json
description: 地址簿集合详情 description: 地址簿名称详情
parameters: parameters:
- description: ID - description: ID
in: path in: path
@@ -985,12 +989,14 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 地址簿集合详情 summary: 地址簿名称详情
tags:
- 地址簿名称
/admin/address_book_collection/list: /admin/address_book_collection/list:
get: get:
consumes: consumes:
- application/json - application/json
description: 地址簿集合列表 description: 地址簿名称列表
parameters: parameters:
- description: 页码 - description: 页码
in: query in: query
@@ -1026,14 +1032,16 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 地址簿集合列表 summary: 地址簿名称列表
tags:
- 地址簿名称
/admin/address_book_collection/update: /admin/address_book_collection/update:
post: post:
consumes: consumes:
- application/json - application/json
description: 地址簿集合编辑 description: 地址簿名称编辑
parameters: parameters:
- description: 地址簿集合信息 - description: 地址簿名称信息
in: body in: body
name: body name: body
required: true required: true
@@ -1057,14 +1065,16 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 地址簿集合编辑 summary: 地址簿名称编辑
tags:
- 地址簿名称
/admin/address_book_collection_rule/create: /admin/address_book_collection_rule/create:
post: post:
consumes: consumes:
- application/json - application/json
description: 创建地址簿集合规则 description: 创建地址簿规则
parameters: parameters:
- description: 地址簿集合规则信息 - description: 地址簿规则信息
in: body in: body
name: body name: body
required: true required: true
@@ -1088,14 +1098,16 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 创建地址簿集合规则 summary: 创建地址簿规则
tags:
- 地址簿规则
/admin/address_book_collection_rule/delete: /admin/address_book_collection_rule/delete:
post: post:
consumes: consumes:
- application/json - application/json
description: 地址簿集合规则删除 description: 地址簿规则删除
parameters: parameters:
- description: 地址簿集合规则信息 - description: 地址簿规则信息
in: body in: body
name: body name: body
required: true required: true
@@ -1114,12 +1126,14 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 地址簿集合规则删除 summary: 地址簿规则删除
tags:
- 地址簿规则
/admin/address_book_collection_rule/detail/{id}: /admin/address_book_collection_rule/detail/{id}:
get: get:
consumes: consumes:
- application/json - application/json
description: 地址簿集合规则详情 description: 地址簿规则详情
parameters: parameters:
- description: ID - description: ID
in: path in: path
@@ -1144,12 +1158,14 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 地址簿集合规则详情 summary: 地址簿规则详情
tags:
- 地址簿规则
/admin/address_book_collection_rule/list: /admin/address_book_collection_rule/list:
get: get:
consumes: consumes:
- application/json - application/json
description: 地址簿集合规则列表 description: 地址簿规则列表
parameters: parameters:
- description: 页码 - description: 页码
in: query in: query
@@ -1189,14 +1205,16 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 地址簿集合规则列表 summary: 地址簿规则列表
tags:
- 地址簿规则
/admin/address_book_collection_rule/update: /admin/address_book_collection_rule/update:
post: post:
consumes: consumes:
- application/json - application/json
description: 地址簿集合规则编辑 description: 地址簿规则编辑
parameters: parameters:
- description: 地址簿集合规则信息 - description: 地址簿规则信息
in: body in: body
name: body name: body
required: true required: true
@@ -1220,7 +1238,9 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 地址簿集合规则编辑 summary: 地址簿规则编辑
tags:
- 地址簿规则
/admin/app-config: /admin/app-config:
get: get:
consumes: consumes:
@@ -1890,6 +1910,34 @@ paths:
summary: OidcAuthQuery summary: OidcAuthQuery
tags: tags:
- Oauth - Oauth
/admin/peer/batchDelete:
post:
consumes:
- application/json
description: 批量设备删除
parameters:
- description: 设备id
in: body
name: body
required: true
schema:
$ref: '#/definitions/admin.PeerBatchDeleteForm'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/response.Response'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/response.Response'
security:
- token: []
summary: 批量设备删除
tags:
- 设备
/admin/peer/create: /admin/peer/create:
post: post:
consumes: consumes:
@@ -1927,14 +1975,14 @@ paths:
post: post:
consumes: consumes:
- application/json - application/json
description: 批量设备删除 description: 设备删除
parameters: parameters:
- description: 设备id - description: 设备信息
in: body in: body
name: body name: body
required: true required: true
schema: schema:
$ref: '#/definitions/admin.PeerBatchDeleteForm' $ref: '#/definitions/admin.PeerForm'
produces: produces:
- application/json - application/json
responses: responses:
@@ -1948,7 +1996,7 @@ paths:
$ref: '#/definitions/response.Response' $ref: '#/definitions/response.Response'
security: security:
- token: [] - token: []
summary: 批量设备删除 summary: 设备删除
tags: tags:
- 设备 - 设备
/admin/peer/detail/{id}: /admin/peer/detail/{id}:

View File

@@ -14,10 +14,10 @@ import (
type AddressBookCollection struct { type AddressBookCollection struct {
} }
// Detail 地址簿集合 // Detail 地址簿名称
// @AddressBookCollections 地址簿集合 // @Tags 地址簿名称
// @Summary 地址簿集合详情 // @Summary 地址簿名称详情
// @Description 地址簿集合详情 // @Description 地址簿名称详情
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param id path int true "ID" // @Param id path int true "ID"
@@ -42,13 +42,13 @@ func (abc *AddressBookCollection) Detail(c *gin.Context) {
return return
} }
// Create 创建地址簿集合 // Create 创建地址簿名称
// @AddressBookCollections 地址簿集合 // @Tags 地址簿名称
// @Summary 创建地址簿集合 // @Summary 创建地址簿名称
// @Description 创建地址簿集合 // @Description 创建地址簿名称
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param body body model.AddressBookCollection true "地址簿集合信息" // @Param body body model.AddressBookCollection true "地址簿名称信息"
// @Success 200 {object} response.Response{data=model.AddressBookCollection} // @Success 200 {object} response.Response{data=model.AddressBookCollection}
// @Failure 500 {object} response.Response // @Failure 500 {object} response.Response
// @Router /admin/address_book_collection/create [post] // @Router /admin/address_book_collection/create [post]
@@ -79,9 +79,9 @@ func (abc *AddressBookCollection) Create(c *gin.Context) {
} }
// List 列表 // List 列表
// @AddressBookCollections 地址簿集合 // @Tags 地址簿名称
// @Summary 地址簿集合列表 // @Summary 地址簿名称列表
// @Description 地址簿集合列表 // @Description 地址簿名称列表
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param page query int false "页码" // @Param page query int false "页码"
@@ -111,12 +111,12 @@ func (abc *AddressBookCollection) List(c *gin.Context) {
} }
// Update 编辑 // Update 编辑
// @AddressBookCollections 地址簿集合 // @Tags 地址簿名称
// @Summary 地址簿集合编辑 // @Summary 地址簿名称编辑
// @Description 地址簿集合编辑 // @Description 地址簿名称编辑
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param body body model.AddressBookCollection true "地址簿集合信息" // @Param body body model.AddressBookCollection true "地址簿名称信息"
// @Success 200 {object} response.Response{data=model.AddressBookCollection} // @Success 200 {object} response.Response{data=model.AddressBookCollection}
// @Failure 500 {object} response.Response // @Failure 500 {object} response.Response
// @Router /admin/address_book_collection/update [post] // @Router /admin/address_book_collection/update [post]
@@ -151,12 +151,12 @@ func (abc *AddressBookCollection) Update(c *gin.Context) {
} }
// Delete 删除 // Delete 删除
// @AddressBookCollections 地址簿集合 // @Tags 地址簿名称
// @Summary 地址簿集合删除 // @Summary 地址簿名称删除
// @Description 地址簿集合删除 // @Description 地址簿名称删除
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param body body model.AddressBookCollection true "地址簿集合信息" // @Param body body model.AddressBookCollection true "地址簿名称信息"
// @Success 200 {object} response.Response // @Success 200 {object} response.Response
// @Failure 500 {object} response.Response // @Failure 500 {object} response.Response
// @Router /admin/address_book_collection/delete [post] // @Router /admin/address_book_collection/delete [post]

View File

@@ -15,9 +15,9 @@ type AddressBookCollectionRule struct {
} }
// List 列表 // List 列表
// @AddressBookCollectionRule 地址簿集合规则 // @Tags 地址簿规则
// @Summary 地址簿集合规则列表 // @Summary 地址簿规则列表
// @Description 地址簿集合规则列表 // @Description 地址簿规则列表
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param page query int false "页码" // @Param page query int false "页码"
@@ -51,10 +51,10 @@ func (abcr *AddressBookCollectionRule) List(c *gin.Context) {
response.Success(c, res) response.Success(c, res)
} }
// Detail 地址簿集合规则 // Detail 地址簿规则
// @AddressBookCollectionRule 地址簿集合规则 // @Tags 地址簿规则
// @Summary 地址簿集合规则详情 // @Summary 地址簿规则详情
// @Description 地址簿集合规则详情 // @Description 地址簿规则详情
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param id path int true "ID" // @Param id path int true "ID"
@@ -79,13 +79,13 @@ func (abcr *AddressBookCollectionRule) Detail(c *gin.Context) {
return return
} }
// Create 创建地址簿集合规则 // Create 创建地址簿规则
// @AddressBookCollectionRule 地址簿集合规则 // @Tags 地址簿规则
// @Summary 创建地址簿集合规则 // @Summary 创建地址簿规则
// @Description 创建地址簿集合规则 // @Description 创建地址簿规则
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param body body model.AddressBookCollectionRule true "地址簿集合规则信息" // @Param body body model.AddressBookCollectionRule true "地址簿规则信息"
// @Success 200 {object} response.Response{data=model.AddressBookCollection} // @Success 200 {object} response.Response{data=model.AddressBookCollection}
// @Failure 500 {object} response.Response // @Failure 500 {object} response.Response
// @Router /admin/address_book_collection_rule/create [post] // @Router /admin/address_book_collection_rule/create [post]
@@ -169,12 +169,12 @@ func (abcr *AddressBookCollectionRule) CheckForm(u *model.User, t *model.Address
} }
// Update 编辑 // Update 编辑
// @AddressBookCollectionRule 地址簿集合规则 // @Tags 地址簿规则
// @Summary 地址簿集合规则编辑 // @Summary 地址簿规则编辑
// @Description 地址簿集合规则编辑 // @Description 地址簿规则编辑
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param body body model.AddressBookCollectionRule true "地址簿集合规则信息" // @Param body body model.AddressBookCollectionRule true "地址簿规则信息"
// @Success 200 {object} response.Response{data=model.AddressBookCollection} // @Success 200 {object} response.Response{data=model.AddressBookCollection}
// @Failure 500 {object} response.Response // @Failure 500 {object} response.Response
// @Router /admin/address_book_collection_rule/update [post] // @Router /admin/address_book_collection_rule/update [post]
@@ -210,12 +210,12 @@ func (abcr *AddressBookCollectionRule) Update(c *gin.Context) {
} }
// Delete 删除 // Delete 删除
// @AddressBookCollectionRule 地址簿集合规则 // @Tags 地址簿规则
// @Summary 地址簿集合规则删除 // @Summary 地址簿规则删除
// @Description 地址簿集合规则删除 // @Description 地址簿规则删除
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param body body model.AddressBookCollectionRule true "地址簿集合规则信息" // @Param body body model.AddressBookCollectionRule true "地址簿规则信息"
// @Success 200 {object} response.Response // @Success 200 {object} response.Response
// @Failure 500 {object} response.Response // @Failure 500 {object} response.Response
// @Router /admin/address_book_collection_rule/delete [post] // @Router /admin/address_book_collection_rule/delete [post]

View File

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

View File

@@ -108,6 +108,8 @@ func AddressBookBind(rg *gin.RouterGroup) {
} }
func PeerBind(rg *gin.RouterGroup) { func PeerBind(rg *gin.RouterGroup) {
aR := rg.Group("/peer") aR := rg.Group("/peer")
aR.POST("/simpleData", (&admin.Peer{}).SimpleData)
aR.Use(middleware.AdminPrivilege())
{ {
cont := &admin.Peer{} cont := &admin.Peer{}
aR.GET("/list", cont.List) aR.GET("/list", cont.List)
@@ -115,10 +117,7 @@ func PeerBind(rg *gin.RouterGroup) {
aR.POST("/create", cont.Create) aR.POST("/create", cont.Create)
aR.POST("/update", cont.Update) aR.POST("/update", cont.Update)
aR.POST("/delete", cont.Delete) aR.POST("/delete", cont.Delete)
aR.POST("/simpleData", cont.SimpleData) aR.POST("/batchDelete", cont.BatchDelete)
arp := aR.Use(middleware.AdminPrivilege())
arp.POST("/batchDelete", cont.BatchDelete)
} }
} }