feat:完善项目

This commit is contained in:
henry
2021-11-15 17:32:23 +08:00
parent f5e2063685
commit 78128277ff
27 changed files with 717 additions and 105 deletions

View File

@ -89,13 +89,13 @@ func (*Config) Area(c *gin.Context) {
* @apiParam {Number} current 当前页
* @apiParam {Number} page_size 页展示数
*
* @apiSuccess (200) {Number} code 成功响应状态码!
* @apiSuccess (200) {String} msg 成功提示
* @apiSuccess (200) {Array} data 数据信息
* @apiSuccess (200) {Object} data 数据信息
* @apiSuccess (200) {String} data.id ID
* @apiSuccess (200) {String} data.title 标题名称
* @apiSuccess (200) {String} data.remark 备注信息
* @apiSuccess (200) {Time} data.created_at 创建时间
* @apiSuccess (200) {Number} code 成功响应状态码!
* @apiSuccess (200) {String} msg 成功提示
*
* @apiSuccessExample {json} Success response:
* HTTPS 200 OK
@ -125,6 +125,30 @@ func (*Config) Breakdown(c *gin.Context) {
APIResponse(err, data)(c)
}
/**
* @api {post} /api/v1/config/breakdown/add 故障信息添加
* @apiVersion 1.0.0
* @apiName ConfigBreakdownAdd
* @apiGroup Config
*
* @apiHeader {string} x-token token
* @apiHeader {string} Content-Type=application/json 传输方式
*
* @apiParam {String} title 名称
* @apiParam {String} [remark="''"] 备注名称
*
* @apiSuccess (200) {Number} code 成功响应状态码!
* @apiSuccess (200) {String} msg 成功提示
* @apiSuccess (200) {Object} data 数据信息
*
* @apiSuccessExample {json} Success response:
* HTTPS 200 OK
* {
* "code": 200
* "msg": "ok"
* "data": null
* }
*/
func (*Config) BreakdownAdd(c *gin.Context) {
form := &struct {
Title string `json:"title" form:"title" binding:"required"`
@ -138,6 +162,31 @@ func (*Config) BreakdownAdd(c *gin.Context) {
APIResponse(err)(c)
}
/**
* @api {post} /api/v1/config/breakdown/edit 故障信息修改
* @apiVersion 1.0.0
* @apiName ConfigBreakdownEdit
* @apiGroup Config
*
* @apiHeader {string} x-token token
* @apiHeader {string} Content-Type=application/json 传输方式
*
* @apiParam {String} id ID
* @apiParam {String} title 名称
* @apiParam {String} [remark="''"] 备注名称
*
* @apiSuccess (200) {Number} code 成功响应状态码!
* @apiSuccess (200) {String} msg 成功提示
* @apiSuccess (200) {Object} data 数据信息
*
* @apiSuccessExample {json} Success response:
* HTTPS 200 OK
* {
* "code": 200
* "msg": "ok"
* "data": null
* }
*/
func (*Config) BreakdownEdit(c *gin.Context) {
form := &struct {
IDStringForm
@ -152,6 +201,29 @@ func (*Config) BreakdownEdit(c *gin.Context) {
APIResponse(err)(c)
}
/**
* @api {post} /api/v1/config/breakdown/delete 故障信息删除
* @apiVersion 1.0.0
* @apiName ConfigBreakdownDelete
* @apiGroup Config
*
* @apiHeader {string} x-token token
* @apiHeader {string} Content-Type=application/json 传输方式
*
* @apiParam {String} id ID
*
* @apiSuccess (200) {Number} code 成功响应状态码!
* @apiSuccess (200) {String} msg 成功提示
* @apiSuccess (200) {Object} data 数据信息
*
* @apiSuccessExample {json} Success response:
* HTTPS 200 OK
* {
* "code": 200
* "msg": "ok"
* "data": null
* }
*/
func (*Config) BreakdownDelete(c *gin.Context) {
form := new(IDStringForm)