From 7ce84b3d1e45d35c7c9f73561893039a05c16995 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 20 十二月 2019 19:38:18 +0800
Subject: [PATCH] fix unTargz
---
controllers/dictionary.go | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/controllers/dictionary.go b/controllers/dictionary.go
index 9794cbe..6654f22 100644
--- a/controllers/dictionary.go
+++ b/controllers/dictionary.go
@@ -2,15 +2,15 @@
import (
"basic.com/dbapi.git"
+ "github.com/gin-gonic/gin"
"webserver/extend/code"
"webserver/extend/util"
- "github.com/gin-gonic/gin"
)
type DictionaryController struct {
-
}
+// @Security ApiKeyAuth
// @Summary 鏍规嵁绫诲瀷鏌ユ壘瀛楀吀
// @Description 鏍规嵁绫诲瀷鏌ユ壘瀛楀吀
// @Produce json
@@ -23,14 +23,16 @@
var api dbapi.DicApi
flag, data := api.FindByType("")
if flag {
- util.ResponseFormat(c,code.Success,data)
+ util.ResponseFormat(c, code.Success, data)
} else {
- util.ResponseFormat(c,code.ComError,data)
+ util.ResponseFormat(c, code.ComError, data)
}
}
+// @Security ApiKeyAuth
// @Summary 鏍规嵁鐖禝D鏌ユ壘瀛楀吀
// @Description 鏍规嵁鐖禝D鏌ユ壘瀛楀吀
+// @Accept x-www-form-urlencoded
// @Produce json
// @Tags 瀛楀吀
// @Param parentId query string false "parentId"
@@ -40,14 +42,14 @@
func (controller DictionaryController) FindByParentId(c *gin.Context) {
parentId := c.Query("parentId")
if parentId == "" {
- util.ResponseFormat(c,code.RequestParamError,"鍙傛暟鏈夎")
+ util.ResponseFormat(c, code.RequestParamError, "鍙傛暟鏈夎")
return
}
var api dbapi.DicApi
flag, data := api.FindByParentId(parentId)
if flag {
- util.ResponseFormat(c,code.Success,data)
+ util.ResponseFormat(c, code.Success, data)
} else {
- util.ResponseFormat(c,code.ComError,"鏌ヨ澶辫触")
+ util.ResponseFormat(c, code.ComError, "鏌ヨ澶辫触")
}
-}
\ No newline at end of file
+}
--
Gitblit v1.8.0