feat:完善项目

This commit is contained in:
henry
2021-11-10 16:07:09 +08:00
parent 863edee71c
commit 5ffb79b4fa
10 changed files with 170 additions and 43 deletions

View File

@ -92,6 +92,40 @@ func (*Manage) Equipment(c *gin.Context) {
APIResponse(err, data)(c)
}
/**
* @api {get} /api/v1/manage/equipment/select 装备Select信息
* @apiVersion 1.0.0
* @apiName ManageEquipmentSelect
* @apiGroup Manage
*
* @apiHeader {string} x-token token
*
* @apiSuccess (200) {Object} data 数据信息
* @apiSuccess (200) {String} data.id ID
* @apiSuccess (200) {String} data.code 装备编码
* @apiSuccess (200) {String} data.title 装备名称
* @apiSuccess (200) {Number} code 成功响应状态码!
* @apiSuccess (200) {String} msg 成功提示
*
* @apiSuccessExample {json} Success response:
* HTTPS 200 OK
* {
* "code": 200
* "msg": "ok"
* "data": [
* {
* "id": "EgmJ4Ga7LQ",
* "code": "S110",
* "title": "装甲车-11",
* }
* ]
* }
*/
func (*Manage) EquipmentSelect(c *gin.Context) {
data, err := manage.NewEquipment()(getSession()(c).(*service.Session)).Select()
APIResponse(err, data)(c)
}
/**
* @api {post} /api/v1/manage/equipment/detail 装备详细信息
* @apiVersion 1.0.0
@ -213,6 +247,44 @@ func (*Manage) Material(c *gin.Context) {
APIResponse(err, data)(c)
}
/**
* @api {get} /api/v1/manage/material/select 器材Select信息
* @apiVersion 1.0.0
* @apiName ManageMaterialSelect
* @apiGroup Manage
*
* @apiHeader {string} x-token token
*
* @apiSuccess (200) {Object} data 数据信息
* @apiSuccess (200) {String} data.id ID
* @apiSuccess (200) {String} data.code 装备编码
* @apiSuccess (200) {String} data.title 装备名称
* @apiSuccess (200) {Float} data.price 单价
* @apiSuccess (200) {String} data.manufacturer_name 制造商
* @apiSuccess (200) {Number} code 成功响应状态码!
* @apiSuccess (200) {String} msg 成功提示
*
* @apiSuccessExample {json} Success response:
* HTTPS 200 OK
* {
* "code": 200
* "msg": "ok"
* "data": [
* {
* "id": "EgmJ4Ga7LQ",
* "code": "S110",
* "title": "装甲车-11",
* "price": 8.88,
* "manufacturer_name": "供应商",
* }
* ]
* }
*/
func (*Manage) MaterialSelect(c *gin.Context) {
data, err := manage.NewMaterial()(getSession()(c).(*service.Session)).Select()
APIResponse(err, data)(c)
}
func (*Manage) MaterialAdd(c *gin.Context) {
form := new(manageMaterialForm)