sunty
2019-06-28 f2d60f4a96b77cf3ae924f9d479bd40dd8fbd13c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package controllers
 
import (
    "basic.com/dbapi.git"
    "webserver/extend/code"
    "webserver/extend/util"
    "github.com/gin-gonic/gin"
)
 
type DictionaryController struct {
 
}
 
// @Summary 根据类型查找字典
// @Description  根据类型查找字典
// @Produce json
// @Tags 字典
// @Param type query string false "字典类型"
// @Success 200 {string} json "{"code":200, success:true, msg:"请求处理成功", data:"成功信息"}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:"错误信息内容"}"
// @Router /data/api-v/dictionary/findByType [get]
func (controller DictionaryController) FindByType(c *gin.Context) {
    var api dbapi.DicApi
    flag, data := api.FindByType("")
    if flag {
        util.ResponseFormat(c,code.Success,data)
    } else {
        util.ResponseFormat(c,code.ComError,data)
    }
}