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
|
||||
|
Reference in New Issue
Block a user