feat: restrict permission roles
This commit is contained in:
+19
-17
@@ -31,7 +31,7 @@ const docTemplate = `{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "支持分页、搜索、按状态/服务类型/技术员筛选",
|
||||
"description": "支持分页、搜索、按状态/服务类型/工单负责人筛选",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -72,7 +72,7 @@ const docTemplate = `{
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "技术员 ID",
|
||||
"description": "工单负责人 ID",
|
||||
"name": "technicianId",
|
||||
"in": "query"
|
||||
},
|
||||
@@ -519,7 +519,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"售后工单"
|
||||
],
|
||||
"summary": "重新分配技术员",
|
||||
"summary": "重新分配工单负责人",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -529,7 +529,7 @@ const docTemplate = `{
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "新技术员 ID",
|
||||
"description": "新工单负责人 ID",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
@@ -617,7 +617,7 @@ const docTemplate = `{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "技术员填写处理结果后提交,工单进入\"待客户确认\"状态",
|
||||
"description": "工单负责人填写处理结果后提交,工单进入\"待客户确认\"状态",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -1558,7 +1558,7 @@ const docTemplate = `{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "支持分页、搜索、按状态/服务类型/技术员筛选",
|
||||
"description": "支持分页、搜索、按状态/服务类型/工单负责人筛选",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -1599,7 +1599,7 @@ const docTemplate = `{
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "技术员 ID",
|
||||
"description": "工单负责人 ID",
|
||||
"name": "technicianId",
|
||||
"in": "query"
|
||||
},
|
||||
@@ -2046,7 +2046,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"项目工单"
|
||||
],
|
||||
"summary": "重新分配技术员",
|
||||
"summary": "重新分配工单负责人",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2056,7 +2056,7 @@ const docTemplate = `{
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "新技术员 ID",
|
||||
"description": "新工单负责人 ID",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
@@ -2144,7 +2144,7 @@ const docTemplate = `{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "技术员填写处理结果后提交,工单进入\"待完成确认\"状态",
|
||||
"description": "工单负责人填写处理结果后提交,工单进入\"待完成确认\"状态",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -2202,7 +2202,7 @@ const docTemplate = `{
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "用于售后工单分配选择技术员/管理员,无需分页",
|
||||
"description": "用于工单分配选择可派单人员,无需分页",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -2394,9 +2394,10 @@ const docTemplate = `{
|
||||
"role": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"admin",
|
||||
"technician",
|
||||
"employee"
|
||||
"software_engineer",
|
||||
"hardware_engineer",
|
||||
"business_manager",
|
||||
"project_manager"
|
||||
]
|
||||
},
|
||||
"username": {
|
||||
@@ -2774,9 +2775,10 @@ const docTemplate = `{
|
||||
"role": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"admin",
|
||||
"technician",
|
||||
"employee"
|
||||
"software_engineer",
|
||||
"hardware_engineer",
|
||||
"business_manager",
|
||||
"project_manager"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+19
-17
@@ -25,7 +25,7 @@
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "支持分页、搜索、按状态/服务类型/技术员筛选",
|
||||
"description": "支持分页、搜索、按状态/服务类型/工单负责人筛选",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -66,7 +66,7 @@
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "技术员 ID",
|
||||
"description": "工单负责人 ID",
|
||||
"name": "technicianId",
|
||||
"in": "query"
|
||||
},
|
||||
@@ -513,7 +513,7 @@
|
||||
"tags": [
|
||||
"售后工单"
|
||||
],
|
||||
"summary": "重新分配技术员",
|
||||
"summary": "重新分配工单负责人",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -523,7 +523,7 @@
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "新技术员 ID",
|
||||
"description": "新工单负责人 ID",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
@@ -611,7 +611,7 @@
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "技术员填写处理结果后提交,工单进入\"待客户确认\"状态",
|
||||
"description": "工单负责人填写处理结果后提交,工单进入\"待客户确认\"状态",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -1552,7 +1552,7 @@
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "支持分页、搜索、按状态/服务类型/技术员筛选",
|
||||
"description": "支持分页、搜索、按状态/服务类型/工单负责人筛选",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -1593,7 +1593,7 @@
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "技术员 ID",
|
||||
"description": "工单负责人 ID",
|
||||
"name": "technicianId",
|
||||
"in": "query"
|
||||
},
|
||||
@@ -2040,7 +2040,7 @@
|
||||
"tags": [
|
||||
"项目工单"
|
||||
],
|
||||
"summary": "重新分配技术员",
|
||||
"summary": "重新分配工单负责人",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
@@ -2050,7 +2050,7 @@
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "新技术员 ID",
|
||||
"description": "新工单负责人 ID",
|
||||
"name": "data",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
@@ -2138,7 +2138,7 @@
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "技术员填写处理结果后提交,工单进入\"待完成确认\"状态",
|
||||
"description": "工单负责人填写处理结果后提交,工单进入\"待完成确认\"状态",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -2196,7 +2196,7 @@
|
||||
"BearerAuth": []
|
||||
}
|
||||
],
|
||||
"description": "用于售后工单分配选择技术员/管理员,无需分页",
|
||||
"description": "用于工单分配选择可派单人员,无需分页",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -2388,9 +2388,10 @@
|
||||
"role": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"admin",
|
||||
"technician",
|
||||
"employee"
|
||||
"software_engineer",
|
||||
"hardware_engineer",
|
||||
"business_manager",
|
||||
"project_manager"
|
||||
]
|
||||
},
|
||||
"username": {
|
||||
@@ -2768,9 +2769,10 @@
|
||||
"role": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"admin",
|
||||
"technician",
|
||||
"employee"
|
||||
"software_engineer",
|
||||
"hardware_engineer",
|
||||
"business_manager",
|
||||
"project_manager"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
+19
-17
@@ -110,9 +110,10 @@ definitions:
|
||||
type: string
|
||||
role:
|
||||
enum:
|
||||
- admin
|
||||
- technician
|
||||
- employee
|
||||
- software_engineer
|
||||
- hardware_engineer
|
||||
- business_manager
|
||||
- project_manager
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
@@ -368,9 +369,10 @@ definitions:
|
||||
type: string
|
||||
role:
|
||||
enum:
|
||||
- admin
|
||||
- technician
|
||||
- employee
|
||||
- software_engineer
|
||||
- hardware_engineer
|
||||
- business_manager
|
||||
- project_manager
|
||||
type: string
|
||||
type: object
|
||||
models.User:
|
||||
@@ -441,7 +443,7 @@ info:
|
||||
paths:
|
||||
/aftersales:
|
||||
get:
|
||||
description: 支持分页、搜索、按状态/服务类型/技术员筛选
|
||||
description: 支持分页、搜索、按状态/服务类型/工单负责人筛选
|
||||
parameters:
|
||||
- description: 页码
|
||||
in: query
|
||||
@@ -463,7 +465,7 @@ paths:
|
||||
in: query
|
||||
name: serviceType
|
||||
type: string
|
||||
- description: 技术员 ID
|
||||
- description: 工单负责人 ID
|
||||
in: query
|
||||
name: technicianId
|
||||
type: integer
|
||||
@@ -754,7 +756,7 @@ paths:
|
||||
name: serialNumber
|
||||
required: true
|
||||
type: string
|
||||
- description: 新技术员 ID
|
||||
- description: 新工单负责人 ID
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
@@ -777,7 +779,7 @@ paths:
|
||||
$ref: '#/definitions/models.ErrorResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 重新分配技术员
|
||||
summary: 重新分配工单负责人
|
||||
tags:
|
||||
- 售后工单
|
||||
/aftersales/{serialNumber}/site-images:
|
||||
@@ -817,7 +819,7 @@ paths:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 技术员填写处理结果后提交,工单进入"待客户确认"状态
|
||||
description: 工单负责人填写处理结果后提交,工单进入"待客户确认"状态
|
||||
parameters:
|
||||
- description: 工单号
|
||||
in: path
|
||||
@@ -1412,7 +1414,7 @@ paths:
|
||||
- 员工管理
|
||||
/project-orders:
|
||||
get:
|
||||
description: 支持分页、搜索、按状态/服务类型/技术员筛选
|
||||
description: 支持分页、搜索、按状态/服务类型/工单负责人筛选
|
||||
parameters:
|
||||
- description: 页码
|
||||
in: query
|
||||
@@ -1434,7 +1436,7 @@ paths:
|
||||
in: query
|
||||
name: serviceType
|
||||
type: string
|
||||
- description: 技术员 ID
|
||||
- description: 工单负责人 ID
|
||||
in: query
|
||||
name: technicianId
|
||||
type: integer
|
||||
@@ -1725,7 +1727,7 @@ paths:
|
||||
name: serialNumber
|
||||
required: true
|
||||
type: string
|
||||
- description: 新技术员 ID
|
||||
- description: 新工单负责人 ID
|
||||
in: body
|
||||
name: data
|
||||
required: true
|
||||
@@ -1748,7 +1750,7 @@ paths:
|
||||
$ref: '#/definitions/models.ErrorResponse'
|
||||
security:
|
||||
- BearerAuth: []
|
||||
summary: 重新分配技术员
|
||||
summary: 重新分配工单负责人
|
||||
tags:
|
||||
- 项目工单
|
||||
/project-orders/{serialNumber}/site-images:
|
||||
@@ -1788,7 +1790,7 @@ paths:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 技术员填写处理结果后提交,工单进入"待完成确认"状态
|
||||
description: 工单负责人填写处理结果后提交,工单进入"待完成确认"状态
|
||||
parameters:
|
||||
- description: 工单号
|
||||
in: path
|
||||
@@ -1823,7 +1825,7 @@ paths:
|
||||
- 项目工单
|
||||
/users/assignable:
|
||||
get:
|
||||
description: 用于售后工单分配选择技术员/管理员,无需分页
|
||||
description: 用于工单分配选择可派单人员,无需分页
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
||||
Reference in New Issue
Block a user