| | |
| | | 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" |
| | |
| | | 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() // 添加时间和创建人 |