feat:完善项目
This commit is contained in:
@ -24,6 +24,47 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* @api {post} /api/v1/supplier/select 供应商Select
|
||||
* @apiVersion 1.0.0
|
||||
* @apiName SupplierSelect
|
||||
* @apiGroup Supplier
|
||||
*
|
||||
* @apiHeader {string} x-token token
|
||||
*
|
||||
* @apiParam {Number} kind 类型(101:制造商,102:材料合作商,103;维修合作商)
|
||||
*
|
||||
* @apiSuccess (200) {Object} data 数据信息
|
||||
* @apiSuccess (200) {String} data.id ID
|
||||
* @apiSuccess (200) {String} data.name 名称
|
||||
* @apiSuccess (200) {Number} code 成功响应状态码!
|
||||
* @apiSuccess (200) {String} msg 成功提示
|
||||
*
|
||||
* @apiSuccessExample {json} Success response:
|
||||
* HTTPS 200 OK
|
||||
* {
|
||||
* "code": 200
|
||||
* "msg": "ok"
|
||||
* "data": [
|
||||
* {
|
||||
* "id": "EgmJ4Ga7LQ",
|
||||
* "name": "测试的",
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
*/
|
||||
func (*Supplier) Select(c *gin.Context) {
|
||||
form := &struct {
|
||||
Kind int `json:"kind" form:"kind" binding:"required"`
|
||||
}{}
|
||||
if err := bind(form)(c); err != nil {
|
||||
APIFailure(err.(error))(c)
|
||||
return
|
||||
}
|
||||
data, err := manage.NewSupplier()(getSession()(c).(*service.Session)).Select(form.Kind)
|
||||
APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {post} /api/v1/supplier/material 器材信息
|
||||
* @apiVersion 1.0.0
|
||||
|
||||
@ -53,6 +53,70 @@ func (*User) Info(c *gin.Context) {
|
||||
APIResponse(nil, data)(c)
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} /api/v1/user/select 用户Select信息
|
||||
* @apiVersion 1.0.0
|
||||
* @apiName UserSelect
|
||||
* @apiGroup User
|
||||
*
|
||||
* @apiHeader {string} x-token token
|
||||
*
|
||||
* @apiSuccess (200) {Object} data 数据信息
|
||||
* @apiSuccess (200) {String} data.id ID-即uuid
|
||||
* @apiSuccess (200) {String} data.name 用户名
|
||||
* @apiSuccess (200) {Number} code 成功响应状态码!
|
||||
* @apiSuccess (200) {String} msg 成功提示
|
||||
*
|
||||
* @apiSuccessExample {json} Success response:
|
||||
* HTTPS 200 OK
|
||||
* {
|
||||
* "code": 200
|
||||
* "msg": "ok"
|
||||
* "data": [
|
||||
* {
|
||||
* "id": "2098151543063711744",
|
||||
* "name": "超级管理员",
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
*/
|
||||
func (*User) Select(c *gin.Context) {
|
||||
data, err := user.NewInstance()(getSession()(c).(*service.Session)).Select()
|
||||
APIResponse(err, data)(c)
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} /api/v1/user/menu 用户菜单信息
|
||||
* @apiVersion 1.0.0
|
||||
* @apiName UserMenu
|
||||
* @apiGroup User
|
||||
*
|
||||
* @apiHeader {string} x-token token
|
||||
*
|
||||
* @apiSuccess (200) {Object} data 数据信息-参考菜单信息
|
||||
* @apiSuccess (200) {Number} code 成功响应状态码!
|
||||
* @apiSuccess (200) {String} msg 成功提示
|
||||
*
|
||||
* @apiSuccessExample {json} Success response:
|
||||
* HTTPS 200 OK
|
||||
* {
|
||||
* "code": 200
|
||||
* "msg": "ok"
|
||||
* "data": [
|
||||
* {
|
||||
* "id": "7X2JlBVknr",
|
||||
* "name": "装备维修",
|
||||
* "kind": 1,
|
||||
* "link": "",
|
||||
* "component": "",
|
||||
* "icon": "",
|
||||
* "parent_id": "0",
|
||||
* "checked": true,
|
||||
* "checked": [],
|
||||
* }
|
||||
* ]
|
||||
* }
|
||||
*/
|
||||
func (*User) Menu(c *gin.Context) {
|
||||
data, err := user.NewMenu()(getSession()(c).(*service.Session)).Menu()
|
||||
APIResponse(err, data)(c)
|
||||
|
||||
@ -270,6 +270,28 @@ func (*Work) Examine(c *gin.Context) {
|
||||
APIResponse(err)
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {post} /api/v1/work/delete 工单流程信息删除
|
||||
* @apiVersion 1.0.0
|
||||
* @apiName WorkDelete
|
||||
* @apiGroup Work
|
||||
*
|
||||
* @apiHeader {string} x-token token
|
||||
*
|
||||
* @apiParam {String} id Id
|
||||
*
|
||||
* @apiSuccess (200) {Object} data 数据信息
|
||||
* @apiSuccess (200) {Number} code 成功响应状态码!
|
||||
* @apiSuccess (200) {String} msg 成功提示
|
||||
*
|
||||
* @apiSuccessExample {json} Success response:
|
||||
* HTTPS 200 OK
|
||||
* {
|
||||
* "code": 200
|
||||
* "msg": "ok"
|
||||
* "data": null
|
||||
* }
|
||||
*/
|
||||
func (*Work) Delete(c *gin.Context) {
|
||||
form := new(IDStringForm)
|
||||
|
||||
@ -337,9 +359,9 @@ func (*Work) Schedule(c *gin.Context) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} /api/v1/work/schedule/edit 工单流程信息修改
|
||||
* @api {post} /api/v1/work/schedule/edit 工单流程信息修改
|
||||
* @apiVersion 1.0.0
|
||||
* @apiName WorkSchedulEdit
|
||||
* @apiName WorkScheduleEdit
|
||||
* @apiGroup Work
|
||||
*
|
||||
* @apiHeader {string} x-token token
|
||||
@ -378,9 +400,9 @@ func (*Work) ScheduleEdit(c *gin.Context) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} /api/v1/work/schedule/delete 工单流程信息删除
|
||||
* @api {post} /api/v1/work/schedule/delete 工单流程信息删除
|
||||
* @apiVersion 1.0.0
|
||||
* @apiName WorkSchedulDelete
|
||||
* @apiName WorkScheduleDelete
|
||||
* @apiGroup Work
|
||||
*
|
||||
* @apiHeader {string} x-token token
|
||||
|
||||
Reference in New Issue
Block a user