edbinfo.go 407 B

123456789101112131415
  1. package logic
  2. import (
  3. "eta/eta_index_lib/models"
  4. "eta/eta_index_lib/services/elastic"
  5. "eta/eta_index_lib/utils"
  6. "strconv"
  7. )
  8. // UpdateEs 更新ES的指标数据
  9. func UpdateEs(edbInfoId int) {
  10. //添加es
  11. itemInfo, _ := models.GetEdbInfoItemByCondition("AND edb_info_id=?", []interface{}{edbInfoId})
  12. elastic.EsAddOrEditEdbInfoData(utils.DATA_INDEX_NAME, strconv.Itoa(itemInfo.EdbInfoId), itemInfo)
  13. }