From 2d5117879d8573ca37ed0bb248f8917ca6202837 Mon Sep 17 00:00:00 2001 From: wubin Date: Fri, 10 Jul 2020 16:34:46 +0800 Subject: [PATCH] update --- .../Dict/DictController/DictController.go | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 dsBigData/Business/Dict/DictController/DictController.go diff --git a/dsBigData/Business/Dict/DictController/DictController.go b/dsBigData/Business/Dict/DictController/DictController.go new file mode 100644 index 00000000..ff45c5f0 --- /dev/null +++ b/dsBigData/Business/Dict/DictController/DictController.go @@ -0,0 +1,36 @@ +package DictController + +import ( + "dsBigData/Business/Dict/DictService" + "dsBigData/Model" + "github.com/gin-gonic/gin" + "net/http" +) + +//模块的路由配置 +func Routers(r *gin.RouterGroup) { + rr := r.Group("/dict") + + rr.GET("/GetXxbxlx", GetXxbxlx) + + return +} + +/** +功能:获取学校办学类型字典 +*/ +func GetXxbxlx(c *gin.Context) { + arr, err := DictService.GetDictInfo("xxbxlxm") + if err != nil { + c.JSON(http.StatusOK, Model.Res{ + Success: false, + Message: err.Error(), + }) + return + } + + c.JSON(http.StatusOK, Model.Res{ + Success: true, + List: arr, + }) +}