From 5a1127aca977be5f0b853fa436e1bd0aacb0fb28 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期五, 28 六月 2019 19:36:22 +0800
Subject: [PATCH] fix dbtable and person uuid

---
 controllers/dbtableperson.go |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/controllers/dbtableperson.go b/controllers/dbtableperson.go
index 86caa20..0ab08be 100644
--- a/controllers/dbtableperson.go
+++ b/controllers/dbtableperson.go
@@ -49,7 +49,7 @@
 func addDbPerson(dbperson *models.Dbtablepersons) (result map[string]interface{}) {
 
 	personId := uuid.NewV4().String() //  浠ュ悗鏇夸唬 渚濇嵁鐢熸垚瑙勫垯
-	dbperson.Uuid = personId
+	dbperson.Id = personId
 	dbperson.PriInsert()
 	url := "http://" + config.EsInfo.Masterip + ":" + config.EsInfo.Httpport +
 		"/" + config.EsInfo.EsIndex.Dbtablepersons.IndexName + "/" + config.EsInfo.EsIndex.Dbtablepersons.IndexType + "/" + personId + "?refresh=wait_for"
@@ -77,7 +77,7 @@
 func (dbc DbPersonController) UpdateDbPerson(c *gin.Context) {
 	var dbperson models.Dbtablepersons
 	c.BindJSON(&dbperson)
-	personid := dbperson.Uuid
+	personid := dbperson.Id
 	if personid == "" {
 		util.ResponseFormat(c, code.RequestParamError, nil)
 		return

--
Gitblit v1.8.0