From b0d994de43a1a654e046d9e0a16962a9f2e069a9 Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期二, 24 九月 2019 20:28:05 +0800 Subject: [PATCH] fix rule get tables --- controllers/dbtablesCon.go | 22 ++++++++++++++++++++-- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/controllers/dbtablesCon.go b/controllers/dbtablesCon.go index 9436848..40c52dc 100644 --- a/controllers/dbtablesCon.go +++ b/controllers/dbtablesCon.go @@ -26,8 +26,8 @@ // @Produce json // @Tags dbtable // @Param isSync path string true "鏄惁鍚屾搴� 1 鍚屾搴� 2鏈湴搴� qita 鍏ㄩ儴搴�" -// @Success 200 {string} json "{"code":200, msg:"鐩綍缁撴瀯鏁版嵁", success:true}" -// @Failure 500 {string} json "{"code":500, msg:"杩斿洖閿欒淇℃伅", success:false}" +// @Success 200 {string} json "{"code":200, msg:"", success:true}" +// @Failure 500 {string} json "{"code":500, msg:"", success:false}" // @Router /data/api-v/dbtable/queryDbTables/{isSync} [POST] func (dbt DbTableController) QueryDbTables(c *gin.Context) { isSync := c.Params.ByName("isSync") @@ -40,6 +40,24 @@ } } +// @Summary 鏌ヨ鏈満鎵�鏈夊簳搴撳垪琛� +// @Description 鏌ヨ鏈満鎵�鏈夊簳搴撳垪琛� +// @Accept x-www-form-urlencoded +// @Produce json +// @Tags dbtable +// @Success 200 {string} json "{"code":200, msg:"", success:true}" +// @Failure 500 {string} json "{"code":500, msg:"", success:false}" +// @Router /data/api-v/dbtable/findAllDbTablesByCurServer [GET] +func (dbt DbTableController) FindAllDbTablesByCurServer(c *gin.Context) { + var api dbapi.DbTableApi + arr,e := api.FindAllDbTablesByCurServer() + if e == nil { + util.ResponseFormat(c,code.Success, arr) + } else { + util.ResponseFormat(c,code.ComError,[]interface{}{}) + } +} + // 渚濇嵁搴曞簱id 鏌ヨ鏁版嵁 func QueryDbTableInfo(tableId string) map[string]interface{} { localConf, err2 := cache.GetServerInfo() -- Gitblit v1.8.0