You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
745 B

package DictController
import (
"dsBigData/Business/Dict/DictService"
"dsBigData/Model"
"fmt"
"github.com/gin-gonic/gin"
"net/http"
)
//模块的路由配置
func Routers(r *gin.RouterGroup) {
rr := r.Group("/dict")
rr.GET("/GetXxbxlx", GetXxbxlx)
rr.POST("/Test", Test)
return
}
func Test(c *gin.Context) {
abc := "aaa"
fmt.Println(abc)
c.JSON(http.StatusOK, Model.Res{
Success: true,
List: "ok",
})
}
/**
功能:获取学校办学类型字典
*/
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,
})
}