From 7de968ad09877a59689e87ca65d27a2706d0eb70 Mon Sep 17 00:00:00 2001
From: sunty <1172534965@qq.com>
Date: 星期四, 04 七月 2019 15:42:29 +0800
Subject: [PATCH] add picDesc
---
controllers/dbtablesCon.go | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/controllers/dbtablesCon.go b/controllers/dbtablesCon.go
index f6bf747..2eb472c 100644
--- a/controllers/dbtablesCon.go
+++ b/controllers/dbtablesCon.go
@@ -66,10 +66,10 @@
func (dbt DbTableController) UpdateDbTables(c *gin.Context) {
dbtable := new(models.Dbtables)
c.BindJSON(&dbtable)
- uuid := c.Params.ByName("uuid")
+ uuid := c.Params.ByName("id")
if uuid == "" {
- uuid = dbtable.Uuid
- fmt.Println("body涓幏鍙栧簳搴搖uid")
+ uuid = dbtable.Id
+ fmt.Println("body涓幏鍙栧簳搴搃d")
}
url := "http://" + config.EsInfo.Masterip + ":" + config.EsInfo.Httpport +
"/" + config.EsInfo.EsIndex.DbTables.IndexName + "/" + config.EsInfo.EsIndex.DbTables.IndexType + "/" + uuid + "/_update"
@@ -106,7 +106,7 @@
dbtable := new(models.Dbtables)
c.BindJSON(&dbtable)
tableId := uuid.NewV4().String()
- dbtable.Uuid = tableId
+ dbtable.Id = tableId
url := "http://" + config.EsInfo.Masterip + ":" + config.EsInfo.Httpport +
"/" + config.EsInfo.EsIndex.DbTables.IndexName + "/" + config.EsInfo.EsIndex.DbTables.IndexType + "/" + tableId
dbtable.PriInsert() // 娣诲姞鏃堕棿鍜屽垱寤轰汉
@@ -139,7 +139,7 @@
// @Failure 500 {string} json "{"code":500, msg:"杩斿洖閿欒淇℃伅", success:false}"
// @Router /data/api-v/dbtable/deleteDBtablesById/{uuid} [POST]
func (dbt DbTableController) DeleteDbTables(c *gin.Context) {
- uuid := c.Params.ByName("uuid")
+ uuid := c.Params.ByName("id")
url := "http://" + config.EsInfo.Masterip + ":" + config.EsInfo.Httpport +
"/" + config.EsInfo.EsIndex.DbTables.IndexName + "/" + config.EsInfo.EsIndex.DbTables.IndexType + "/" + uuid + "/_update"
params := "{\"doc\":{\"isDelete\":\"1\"}}"
--
Gitblit v1.8.0