| | |
| | | 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" |
| | |
| | | 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 |