controllers/dbtableperson.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
controllers/dbtablesCon.go | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
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 controllers/dbtablesCon.go
@@ -68,8 +68,8 @@ c.BindJSON(&dbtable) uuid := c.Params.ByName("uuid") if uuid == "" { uuid = dbtable.Uuid fmt.Println("body中获取底库uuid") uuid = dbtable.Id fmt.Println("body中获取底库id") } 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() // 添加时间和创建人