feat:完善项目

This commit is contained in:
henry
2021-11-10 15:09:31 +08:00
parent 095bdcfe4c
commit 863edee71c
6 changed files with 161 additions and 5 deletions

View File

@ -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